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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Alcander
Wanderer


Joined: 04 Aug 2001
Posts: 79
Location: USA

PostPosted: Mon Dec 31, 2007 6:33 pm   

Potion Script problem
 
On the pattern "brew (%d) cyan"$

I am trying to use the code below. I really suck at these things so if you see obvious I do apologize.

@cyan = the number of cyan potions I have available
@waters = the number of water potions that I use to create cyan potions
fb = a mud alias, Fill Bottle

When I attempt to run this trigger it ends up locking up my Cmud session. Anything obvious that I am doing wrong here?

Any help is appreciated.

Code:
#IF (@cyan > %1) {
  put cyan potions in backpack
  get %1 cyan potions from backpack
  drop %1 cyan potions
  }
#IF (@Cyan < %1) {#UNTIL (@waters > %1) {fb 25}}
#IF (@waters > %1) {#UNTIL (@cyan > %1) {create 25 mana}}
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: Mon Dec 31, 2007 10:43 pm   
 
You have an infinite #UNTIL loop, read here more detailed explanation: http://forums.zuggsoft.com/forums/viewtopic.php?t=29411
For ex., in your first #until loop there is no commands inside loop body to adjust @waters value, so if once (@waters > %1) evaluates to true, it will remains true forever.
Reply with quote
Alcander
Wanderer


Joined: 04 Aug 2001
Posts: 79
Location: USA

PostPosted: Tue Jan 01, 2008 6:27 pm   
 
Thanks Arde. I knew it was something stupid.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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