Variable undefined?

Post » Mon Nov 09, 2015 7:24 pm

I got my script down to the point that it's only complaint is: "variable EndGameNote01 is undefined"

For this, it will not compile. My script is shown below. How do I fix this error? (EndGameNote01 is a custom note I made, I want it essentially magically transported into the players inventory.) Needless to say, I'm new to all this.

Scriptname EndGameQ00S01 extends Quest
Event OnInit()
Game.GetPlayer().AddItem(EndGameNote01, 1, 1)
EndEvent
User avatar
Chrissie Pillinger
 
Posts: 3464
Joined: Fri Jun 16, 2006 3:26 am

Post » Mon Nov 09, 2015 5:14 pm

Has EndGameNote01 been set up as a note or item in the geck?
Additem or removeitem only takes an existing item as a parameter there.
User avatar
Spencey!
 
Posts: 3221
Joined: Thu Aug 17, 2006 12:18 am

Post » Mon Nov 09, 2015 11:41 am

You need to define what "EndGameNote01" is (a property). I'm assuming it's a "miscobject"

MiscObject Property EndGameNote01 AutoEvent OnInit()   Game.GetPlayer().AddItem(EndGameNote01, 1, 1)EndEvent

And then in the CK where you add your script, fill the property to point to the note.

User avatar
Ilona Neumann
 
Posts: 3308
Joined: Sat Aug 19, 2006 3:30 am


Return to V - Skyrim