mIRC Home    About    Download    Register    News    Help

Print Thread
#150392 02/06/06 09:12 AM
Joined: May 2006
Posts: 22
S
schism Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: May 2006
Posts: 22
Can anyone tell me why this variable is not increasing? Am i just too tired to see it?

Code:
    

    if (details.php?id= isin %s) && (amp isin %s) && ($nohtml(%s) !isnum) && ($nohtml(%s) != $null) { 
      var %a = 1
      if (%a < 15) {
        echo -ag %a
        echo -ag $replace($nohtml(%s),.,$chr(32))
        inc %a
      }
      else { sockclose $sockname }
    }



It will not increase the variable, it just stays at 1... Everything else echoes, including the number each time, but it will not increase.

Last edited by schism; 02/06/06 09:18 AM.
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
you set the local var %a to 1 var %a = 1
then test if its < 15 (WHICH IT ALWAYS WELL BE SINCE YOU JUST SET IT TO 1)
then you echo it (which is what i assume u keep seeing as the value "1" you say it stays at)
then ya echo something else from %s
then you add 1 to %a making it 2

on the next pass (i assume theres multiple passes) your gonna set %a to 1 again

Joined: May 2006
Posts: 22
S
schism Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: May 2006
Posts: 22
thanks... not sure what I was thinking blush

I guess I need some sleep...


Link Copied to Clipboard