• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Creates serperate variable even if it is in constants

Summ

(\/)(;,,;)(\/) Y not?
Staff member
Global Moderator
Joined
Oct 15, 2008
Messages
4,136
Solutions
12
Reaction score
1,115
Location
Germany :O
Hi

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..
 
Well I would do it, but I need to store like 30x a string and a table..
 
Back
Top