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


Joined: 28 Oct 2001
Posts: 43
Location: USA

PostPosted: Sat May 24, 2003 1:31 pm   

Simple Question ... i hope
 
Okay im wanting to figure out how i can have zmud execute a certain command the number of times that is stored in a variable. I.E. if @var is equal to 6 i want to execute a command 6 times how can i check to see that @var equals and make it do the command that many times?

--
BoBB
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat May 24, 2003 2:55 pm   
 
#<@var> command
#EXEC #@var command
#LOOP @var {command}
#WHILE (@var > 0) {#ADD var -1;command}
#UNTIL (@var = 0) {#ADD var -1;command}

You could probably think of others if you tried.

LightBulb
Advanced Member
Reply with quote
snoogans
Novice


Joined: 28 Oct 2001
Posts: 43
Location: USA

PostPosted: Sun May 25, 2003 12:01 am   
 
Thanks! I knew there would be some easy way to parse the variable after # :)

--
BoBB
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