The code:
Scriptname nyczSBSQuestScript extends Quest GlobalVariable Property nyczSBSAccount AutoEvent OnUpdateGameTime() Debug.Trace("OnUpdateGameTime runs") int curval = nyczSBSAccount.GetValueInt() int newval = (curval * 1.05) as int if curval != newval nyczSBSAccount.SetValueInt(newval) UpdateCurrentInstanceGlobal(nyczSBSAccount) endIfendEventThe error log:
[02/13/2012 - 04:01:02PM] OnUpdateGameTime runs[02/13/2012 - 04:01:02PM] error: Cannot call GetValueInt() on a None object, aborting function callstack: [nyczSBS (0D000D92)].nyczSBSQuestScript.OnUpdateGameTime() - "nyczSBSQuestScript.psc" Line 7[02/13/2012 - 04:01:02PM] warning: Assigning None to a non-object variable named "::temp0"stack: [nyczSBS (0D000D92)].nyczSBSQuestScript.OnUpdateGameTime() - "nyczSBSQuestScript.psc" Line 7
Am I missing something really obvious here, or what? I initialize the global as a property (actually copypasted that line from another - working - script I use) and yet it behaves like http://www.gamesas.com/topic/1346752-using-properties-in-custom-functions/, like it completely ignore the declaration. I've looked att stock scripts, they look like mine... I think. Gah.
EDIT: Oh never mind. I had to initialize the property outside of the code as well (the property dialog, auto-fill etc). It works like it should now.
