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
ArjenJ
Wanderer


Joined: 30 Jan 2006
Posts: 66

PostPosted: Thu Apr 27, 2006 6:41 pm   

help with 2 commands from 1 string variable
 
Ok, little question, I'm so bad in explaining what I want. I hope somebody understands this.

ok, this is in my code somewhere.
nextmove = %concat("TARGET LEFT LEG;", @nextmove)

There is this string @nextmove
whenever I regain balance (which is needed to do something in the Mud I play) this string is send to the Mud unless it's "0"
TARGET LEFT LEG is a command that doesn't take any balance.
so, when I have balance I can put "TARGET LEFT LEG; DSL @target" in the zMud command line and send these two commands to the Mud at the same time. This works from the command line, but somehow I can't get the two commands in my @nextmove string without zMud sending it to the Mud as one string. The ; just doesn't work when it's not comming from the command line.
Reply with quote
Tech
GURU


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

PostPosted: Thu Apr 27, 2006 6:45 pm   
 
When you do the command in the editor you don't need the semicolon. You just need to put the commands on separate lines. In other words your code would be
Code:
Target left leg
DSL @Target

At the command prompt the semi-colon is used to tell zMud to treat the command as two separate ones. In the editor just putting them on separate lines accomplishes that.
_________________
Asati di tempari!
Reply with quote
Vorax
Apprentice


Joined: 29 Jun 2001
Posts: 198
Location: USA

PostPosted: Thu Apr 27, 2006 7:45 pm   
 
If you're storing 2 commands in a single variable you might want to use #EXECUTE or something similar to send them as 2 separate commands instead of one.
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