|
dazed-n-confused Novice
Joined: 14 Jan 2004 Posts: 31
|
Posted: 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. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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
}} |
|
|
|
dazed-n-confused Novice
Joined: 14 Jan 2004 Posts: 31
|
Posted: 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. :)
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Mar 22, 2004 9:24 pm |
Yeah, I guess I was. Hope the trigger helped anyway.
|
|
|
|
|
|