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
fhqwhgad
Novice


Joined: 07 Feb 2005
Posts: 38

PostPosted: Sat Dec 15, 2007 4:18 pm   

stop executing scipt if var is higher then
 
hi,
I need to stop executing my script when $roomnum is higher then 85.
I tried #if ($roomnum > 85) {#abort} with no success.
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Sat Dec 15, 2007 5:41 pm   
 
It would help if you posted the script. It's entirely possible that #ABORT isn't really what're you're looking for, and we'll be able to offer advice on how to make the script stop executing when we see the entire logical flow.
Reply with quote
fhqwhgad
Novice


Joined: 07 Feb 2005
Posts: 38

PostPosted: Sat Dec 15, 2007 5:44 pm   
 
Didn't think of that. Anywhere here it is. It is in an alias.
Code:
$roomnum = 100603;
#show Monsters program started..
#loop %1 {
#wait 500;
goto $roomnum;
$roomnum = $roomnum + %random(1,7);
#if ($roomnum>100662) {
#abort;
}
$doordie = %random(1,3);
#sw ($doordie=1)
 {
  resets 1 mob 100601 7 1
 }
 ($doordie=2) {
  resets 1 mob 100602 7 1
 }
  ($doordie=3) {
  resets 1 mob 100603 7 1
 }
}
Reply with quote
fhqwhgad
Novice


Joined: 07 Feb 2005
Posts: 38

PostPosted: Sat Dec 15, 2007 6:14 pm   
 
Turns out #break is a good thing to use here :)
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sat Dec 15, 2007 6:44 pm   
 
You probably want to use the new #EXIT command instead of #ABORT, or you could us. It's in version 2.18.
_________________
Asati di tempari!
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