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
dazed-n-confused
Novice


Joined: 14 Jan 2004
Posts: 31

PostPosted: Mon Mar 22, 2004 12:38 am   

string variables
 
Someone barges over and shoves you to the south.
I have:
#trigger {Someone barges over and shoves you to the (%w)}
{pushed = %1}
#if (@pushed=south)(run=north)
#if (@pushed=direction)(@run=opposite_direction)
I know my syntax is bad, but what Im trying to do is put the word at the end of the string into a variable and create another variable from it. If anyone has a bright idea im all ears.Smile
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Mar 22, 2004 2:10 am   
 
Bright idea #1: Look up the correct syntax instead of apologizing for using the wrong syntax. Spacing is important.
Bright idea #2: Always check the builtin functions and commands before spending hours developing a script to duplicate them.

#trigger {Someone barges over and shoves you to the (%w)} {
pushed = %1
run = %reversedir( %1, 1)
#IF (%len( @run) = 0) {
#BEEP
#SAY No REVERSE! Pushed to @pushed
}}
Reply with quote
dazed-n-confused
Novice


Joined: 14 Jan 2004
Posts: 31

PostPosted: Mon Mar 22, 2004 6:49 am   
 
Having a bad day there LightBulb? I would like to say that I for one appreciate all of the "guru's" that keep this forum running as smooth as it is. Keep it up guys. :)
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Mar 22, 2004 9:24 pm   
 
Yeah, I guess I was. Hope the trigger helped anyway.
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