bWolfie 139 Posted May 11, 2017 Hello, I want to set a permanent character variable that calls from an array. For example, my variable set up: setarray(variable$[0], "value_1", "value_2", "value_3" ); And then call array to set the variable: variable$[2] = 1; It seems to work okay...but when scripts reload, values are cleared. Any help? Thanks. Quote Share this post Link to post Share on other sites
0 meko 170 Posted May 11, 2017 (edited) setarray() does not create the structure of the array; it sets multiple elements of the array at the same time. this means every time setarray() is called it will overwrite the values. arrays do not need to be declared. every variable is always implicitly an array Also, there's another problem: variable$[2] = 1; You are setting an integer as value of a string variable If what you need is an array of integers then remove the "$" in the variable name Edited May 11, 2017 by meko Quote Share this post Link to post Share on other sites
0 bWolfie 139 Posted May 13, 2017 sorry for my question i worked it out. Quote Share this post Link to post Share on other sites
Hello,
I want to set a permanent character variable that calls from an array.
For example, my variable set up:
And then call array to set the variable:
It seems to work okay...but when scripts reload, values are cleared.
Any help? Thanks.
Share this post
Link to post
Share on other sites