Hi
I have a problem with my script.
It is a globalevent "onStartup" and in that script I do something like:
The variable "_VARIABLE" is initialized in 000-constant.lua.
Now the problem:
The startup script should add the values to the initialized variable, but it seems like it creates a seperate one, because I can call the variable from the startup script and it works fine, but if I do it in a talkaction it just shows me the empty array (from constant) which wasn't changed..
(example
In creaturescript:
#_VARIABLE returns 2
In talkactions:
#_VARIABLE returns 0
=> In talkactions it gets the empty {} from constant.lua..
I have a problem with my script.
It is a globalevent "onStartup" and in that script I do something like:
PHP:
_VARIABLE[1] = {2,3}
_VARIABLE[2] = {66,4}
The variable "_VARIABLE" is initialized in 000-constant.lua.
Now the problem:
The startup script should add the values to the initialized variable, but it seems like it creates a seperate one, because I can call the variable from the startup script and it works fine, but if I do it in a talkaction it just shows me the empty array (from constant) which wasn't changed..
(example
In creaturescript:
#_VARIABLE returns 2
In talkactions:
#_VARIABLE returns 0
=> In talkactions it gets the empty {} from constant.lua..