PDA

View Full Version : Help with a script error



kairos
March 21st, 2011, 02:36
I'm getting an error from a ruleset I'm putting together for Strands of Fate. I've got a character sheet subwindow for Advantages which has a windowlist, the windowclass for which contains only a windowopencontrol and a string for the Advantage name.

When I click the windowopencontrol, the window with the advantage data opens as it should, but I get his error on the console.

Script Error: [string "advantage:<unnamed>"]:1: attempt to index global 'Preferences' (a nil value)


Anyone have any tips as to what might be causing this?

Thanks,
Brian

Zeus
March 21st, 2011, 18:53
Tricky to be absolutley sure as I cannot see the script blocks for the classes and controls you have referenced. Can you post these up?

However I would check the onInit() script block (or routines that are being called from the onInit()) for the string control 'advantages'. It looks like your making a call to Preferences which does not exist. Hence the nil error message.

kairos
March 22nd, 2011, 01:26
Thanks! Figured it out, finally. Had to do with the close button control. :P

K