Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:06 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.