Okay, I was helping someone with a script and came across a problem.
I load all the levels from the gmap file into an array. Good, done.
Then I have a set of levels the player has been in. Good, that works(sort of...).
Now it's time to compare the levels the player has been in, with the levels of the gmap. Not good, it won't work and I have no idea why.
This is part of the script, and variables that are loaded.
Quote:
|
Originally Posted by this.mapinfo[1]
be_a01.nw,be_b01.nw,be_c01.nw,be_d01.nw,be_e01.nw, be_f01.nw,be_g01.nw,be_h01.nw,be_i01.nw,be_j01.nw, be_k01.nw,be_l01.nw,
|
Quote:
|
Originally Posted by client.mapviewed[i]
be_a01.nw,be_k01.nw,be_l01.nw
|
PHP Code:
for (i=0;i<client.mapviewed.size();i++) {
if (client.mapviewed[i] in this.mapinfo[1]) {
echo("test");
}
}
It will not echo test. If I put an echo before the if check it fires correctly, so it's not the loop. Any idea what's going on?