View unanswered posts | View active topics It is currently Tue Apr 21, 2026 5:44 pm



Reply to topic  [ 3 posts ] 
 "This isn’t working" ?? 
Author Message
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post 
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

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Sun May 06, 2007 3:00 pm
Profile ICQ WWW
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1134
Location: Augusta, GA
Unread post 
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.

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Sun May 06, 2007 11:48 pm
Profile WWW
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post 
Bah, yea, was... I changed it halfway thru. It was...

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

more or less

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Mon May 07, 2007 1:41 am
Profile ICQ WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.