View Single Post
  #1  
Old 12-21-2007, 08:31 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
array[i] in array

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[iin 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?
Reply With Quote