www.ClassicTW.com
https://mail.black-squirrel.com/

"This isn’t working" ??
https://mail.black-squirrel.com/viewtopic.php?f=15&t=19276
Page 1 of 1

Author:  Singularity [ Sun May 06, 2007 3:00 pm ]
Post subject: 

PHX just posted a snippet of code, I was tweaking it to see if I could get it to work and suddenly the post disappeared. If it was PHX that erased it, that's cool. If it was another mod or an admin, well... ICQ me, we need to chat.

Anyway... here's my post.

.....

Well I'm not entirely sure what you're trying, but I don't think you can do operand substitution in twx. Here's kindof the same vein...

Code:
echo ansi_6 "*How many incoming warps are you looking for? "
getconsoleinput $var1 singlekey
:re_ask
echo ansi_6 "*Do you want sectors that are " ansi_14 "E" ansi_6 "qual to " ansi_14 "G" ansi_6 "reater than or " ansi_14 "L" ansi_6 "ess than " ansi_14 $var1 ansi_6 "? "
getconsoleinput $var2 singlekey
lowercase $var2
if ($var2 <> "e") AND ($var2 <> "g") AND ($var2 <> "l")
     goto :re_ask
end
setVar $newSectors ""
setvar $sect 1
while ($sect <= SECTORS)
     if ($var2 = "g")
             if (sector.warpincount[$sect] > $var1)
                  setvar  $newSectors $newSectors & " " & $sect
             end
     elseif ($var2 = "l")
             if (sector.warpincount[$sect] < $var1)
                  setvar  $newSectors $newSectors & " " & $sect
             end
     else
             if (sector.warpincount[$sect] = $var1)
                  setvar  $newSectors $newSectors & " " & $sect
             end
     end
     add $sect 1
end
setvar $sectors $newSectors
return

Author:  ElderProphet [ Sun May 06, 2007 11:48 pm ]
Post subject: 

Bummer, I guess I missed the earlier posts. What was PHX trying to do?

P.S. Sing, I think your index is supposed to be $sect, not $idx.

Author:  Singularity [ Mon May 07, 2007 1:41 am ]
Post subject: 

Bah, yea, was... I changed it halfway thru. It was...

if ($sect $var2 $var) ...

more or less

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/