Since the update with the drag n drop, i'm getting some nasty nasty errors in the flash client.
On load, i loaded an object with settings for my little 'system'.
var arSystem = {sipPrio: 'Health',Announce: 'No',GroupTarget: 'No'};
The object is created without any errors, however my old method to access the object now throws an error:
arSystem['Announce'] = 'Yes'
Now causes:
Error in Button Script 2:
ReferenceError: 'arSystem' is undefined
What changed with the new system regarding these variables and is there a workaround for this issue?
Comments
So instead of defining globals, if you need to access something between scripts, you should define it as a property of the client object.
Just change:
var arSystem = {sipPrio: 'Health',Announce: 'No',GroupTarget: 'No'};
to:
client.arSystem = {sipPrio: 'Health',Announce: 'No',GroupTarget: 'No'};
and it should work.
You don't need to change arSystem[Announce'] to client.arSystem['Announce']. You only need to do this for variable declarations, not for references to variables.
(This is actually similar to how global variables work in JavaScript anyway. When you do var blah = "blah"; in browser JavaScript, that's actually just shorthand for window.blah = "blah";)
Results of disembowel testing | Knight limb counter | GMCP AB files