Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
NeverNor
Novice


Joined: 18 Nov 2006
Posts: 32

PostPosted: Mon Jun 25, 2007 8:43 pm   

Script running over If statement
 
Alright it is suppose to put gems in one container and everything else in another, but it is just running over the if statement. This is DragonRealms btw.

Quote:

#CLASS {LooseGems}
#VAR LooseGemList {diopside|chain|toes|coat|runestone|runestone|arrowhead|mace|sitting|doors|Bursar|Bourse|basket|Cashiers}
#VAR LooseGemListLoopVar {15} {1}
#VAR LooseGemActual {casket|coffer|chest|strongbox|caddy|crate|skippet|trunk|box|jasper|diopside|bloodstone|topaz|quartz|crystal}
#VAR iLooseGemActual {10} {}
#TRIGGER {You also see (*)} {
#VAR LooseGemList {%1}
#VAR LooseGemListLoopVar 1
#VAR LooseGemList %replace( @LooseGemList, ", and", "|")
#VAR LooseGemList %replace( @LooseGemList, ", ", "|")
#VAR LooseGemList %replace( @LooseGemList, ".", "")
#LOOP %numitems( @LooseGemList) {
#VAR LooseGemList %replaceitem( %word( %item( @LooseGemList, @LooseGemListLoopVar), %numwords( %item( @LooseGemList, @LooseGemListLoopVar))), @LooseGemListLoopVar, @LooseGemList)
#ADD LooseGemListLoopVar (+1)
}
#FORALL @LooseGemList {#IF (%ismember( %i, @LooseGemActual)) {#VAR iLooseGemActual %additem( %ismember( %i, @LooseGemActual), @iLooseGemActual)} {}}
#ECHO {RemoveLoseItems}
}
#TRIGGER {RemoveLoseItems} {#IF (@iLooseGemActual) {
#ECHO {%item( @iLooseGemActual, 1)}
#IF (%item( @iLooseGemActual, 1) <= 9) {stow %item( @LooseGemActual, %item( @iLooseGemActual, 1)) in my bag} {stow %item( @LooseGemActual, %item( @iLooseGemActual, 1)) in my back}
} {#ECHO {NoMoreLooseGems}}}
#TRIGGER {You put your %item( @LooseGemActual, %item( @iLooseGemActual, 1)) in your * } {
#VAR iLooseGemActual %delitem( %item( @iLooseGemActual, 1), @iLooseGemActual)
#ECHO {RemoveLoseItems}
}
#TRIGGER {test} {#VAR iLooseGemActual %delitem( %item( @iLooseGemActual, 1), @iLooseGemActual)}
#CLASS 0
Reply with quote
ShadowsPirate
Beginner


Joined: 15 Jun 2007
Posts: 17

PostPosted: Mon Jun 25, 2007 9:38 pm   
 
At the middle of the bottom, you have this line.

Quote:
#TRIGGER {RemoveLoseItems} {#IF (@iLooseGemActual) {


I could be mistaken, but should "RemoveloseItems" be "RemovelooseItems"? Maybe just a typo?
Reply with quote
NeverNor
Novice


Joined: 18 Nov 2006
Posts: 32

PostPosted: Mon Jun 25, 2007 10:32 pm   
 
yeah it is a typo, but it is a universal typo, meaning it it is misspelled globally, so it has no effect. Thanks, though.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net