OnPackageEnd Not working. (Unknown type 'package')

Post » Tue Nov 20, 2012 3:48 am

The title. Im trying to make it so that when a package ends, in this case, FRLAiPackage, it updates a quest. The script is on actor FRLVerliunTrelus, with the following typed into the code.

Scriptname FRLEndPackage extends ObjectReferencePackage Property FRLAiPackage  AutoQuest Property FRLQuest01  AutoActor Property FRLVerliunTrelus  AutoEvent OnPackageEnd  (frlaipackage akOldPackage)  FRLQuest01.SetStage(40)  FRLQuest01.SetObjectiveDisplayed(40)  FRLQuest01.SetObjectiveCompleted(30)EndEvent

And in Response, it spits this at me.

Starting 1 compile threads for 1 files...
Compiling "FRLEndPackage"...
e:\pc gaming folder\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\FRLEndPackage.psc(10,34): unknown type frlaipackage
No output generated for FRLEndPackage, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on FRLEndPackage


So, any ideas?

EDIT: Just so you know, I've tried it in all possible (reasonable) spellings and capitalization's.
User avatar
Davorah Katz
 
Posts: 3468
Joined: Fri Dec 22, 2006 12:57 pm

Post » Mon Nov 19, 2012 10:36 pm

My guess? OnPackageEnd is an Actor function, not an ObjectReference function.
User avatar
Robyn Lena
 
Posts: 3338
Joined: Mon Jan 01, 2007 6:17 am

Post » Mon Nov 19, 2012 7:34 pm

Well, my visual papyrus reference, and the CKWIKI page show no evidence of that.

Event OnPackageEnd(Package akOldPackage)  Debug.Trace("We just stopped running the " + akOldPackage + " package")endEvent

That is an example code given for OnPackageEnd.

Plus, it's already on my actor.
User avatar
Etta Hargrave
 
Posts: 3452
Joined: Fri Sep 01, 2006 1:27 am

Post » Tue Nov 20, 2012 12:45 am

Its an 'Actor' type script. Please look at the title of the function.
http://www.creationkit.com/OnPackageEnd_-_Actor

You are extending ObjectReference, instead of Actor.

Scriptname FRLEndPackage extends ObjectReference
User avatar
Enny Labinjo
 
Posts: 3480
Joined: Tue Aug 01, 2006 3:04 pm

Post » Tue Nov 20, 2012 10:05 am

oooooh. ok, may bad, Sorry. So, how would i fix this? I'm ok at writing cod,e just not good at putting it somewhere. Is it as simple as changing the line:

Scriptname FRLEndPackage extends ObjectReference

to something resembling

Scriptname FRLEndPackage extends Actor
User avatar
Eric Hayes
 
Posts: 3392
Joined: Mon Oct 29, 2007 1:57 am

Post » Tue Nov 20, 2012 1:01 am

That is correct. And its placed on the Actor. I had to learn this the hard way, trying to figure it out myself. :lol:

Once you get that, then you can see if there are any other issues.
User avatar
Gavin Roberts
 
Posts: 3335
Joined: Fri Jun 08, 2007 8:14 pm

Post » Tue Nov 20, 2012 2:47 am

I noticed a while back this appeared broke. I have aliases (extended referencealias ... which should pick up the actors events) and I noticed that OnPackageStart works but not OnPackageEnd. It has been a while since I tested, but I think OnPackageChange may work as well (which essentially gives you the same information as OnPackageEnd). Just use one of the other varients...
User avatar
Charity Hughes
 
Posts: 3408
Joined: Sat Mar 17, 2007 3:22 pm

Post » Tue Nov 20, 2012 8:32 am

Still getting that unknown type error. Did i forget to move something?

Scriptname FRLEndPackage extends ActorPackage Property FRLAiPackage  AutoQuest Property FRLQuest01  AutoActor Property FRLVerliunTrelus  AutoEvent OnPackageEnd  (FRLAiPackage akOldPackage)  FRLQuest01.SetStage(40)  FRLQuest01.SetObjectiveDisplayed(40)  FRLQuest01.SetObjectiveCompleted(30)EndEvent

EDIT: oops. that's embarrassing. forgot to change to Actor extension.

EDIT2: here now is this new error.



Starting 1 compile threads for 1 files...
Compiling "FRLEndPackage"...
e:\pc gaming folder\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\FRLEndPackage.psc(10,34): unknown type frlaipackage
e:\pc gaming folder\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\FRLEndPackage.psc(10,0): the parameter types of function onpackageend in the empty state on script frlendpackage do not match the parent script actor
No output generated for FRLEndPackage, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on FRLEndPackage
User avatar
City Swagga
 
Posts: 3498
Joined: Sat May 12, 2007 1:04 am

Post » Tue Nov 20, 2012 5:26 am

Event OnPackageEnd (Package akOldPackage)
if (akOldPackage == FRLAiPackage)
;do stuff
endif
endEvent
User avatar
stacy hamilton
 
Posts: 3354
Joined: Fri Aug 25, 2006 10:03 am

Post » Tue Nov 20, 2012 9:58 am

Event OnPackageEnd (Package akOldPackage)
if (akOldPackage == FRLAiPackage)
;do stuff
endif
endEvent

Tried it, no luck. with both, Actor, and ObjectReference types extensions.

EDIT: ... OOOOOHHHH. It works. I misprinted the "Package" Part. Lol, my bad. thanks, time to test.
User avatar
Alycia Leann grace
 
Posts: 3539
Joined: Tue Jun 26, 2007 10:07 pm


Return to V - Skyrim