Quote:
Originally Posted by xAndrewx
Oh, such as...?
|
I don't know precisely what Chris is referring to, but I have my own issues with it. The way
randomstring works is something like this:
Your array of:
PHP Code:
temp.locations = {
{"onlinestartlocal.nw", 30, 30},
{"someotherlevel.nw", 30, 30}
};
Turns into
PHP Code:
temp.locations = {
"onlinestartlocal.nw,30,30,",
"someotherlevel.nw,30,30,"
};
Which
randomstring then runs on, and returns a single value such as
PHP Code:
temp.value = "onlinestartlocal.nw,30,30,";
When you then run
temp.value[0] it changes
temp.value into
PHP Code:
temp.value = {"onlinestartstartlocal.nw", "30", "30"};
And you continue on with your script.
The issue with this is all the implicit casting between arrays and strings, and it is essentially an abuse of the internal handling of data in GS2.
In the midst of all this complexity, there is a lot of room for error and inefficiency.