|
rehevkor Newbie
Joined: 02 Nov 2006 Posts: 9
|
Posted: Tue Mar 04, 2008 6:40 pm
#IF question |
Hello! I have a teleport alias that locates on the zmud map based on the teleport location using #IF statements
#IF (%-1=~"am ring") {#TELEPORT 10684} {#IF (%-1=~"bp ring") {#TELEPORT 14091} {#IF (%-1=~"medina") {#TELEPORT 13819} {#ECHO Unknown map location!}}}
However, the patterns with spaces in them behave strangely, "am ring" works correctly, but "bp ring" does not, going to the "am ring" location. Also gibberish patterns with spaces "ff ff" point to the "am ring" location. "media" works fine. How do I format the command matching to work with the spaces?
I'm hoping there is a simple solution to fix this. Thanks!
<snip>
EDIT: Never mind, managed to find a work around that didn't need the spaces, thank you! |
|
|
|
Zhiroc Adept
Joined: 04 Feb 2005 Posts: 246
|
Posted: Wed Mar 05, 2008 7:26 am |
You need spaces around the =~ operators, and you need to quote the %-1's. The following acts like you would expect:
Code: |
#IF ("%-1" =~ "am ring") {#SH am} {#IF ("%-1" =~ "bp ring") {#SH bp} {#IF ("%-1" =~ "medina") {#SH medina} {#ECHO Unknown map location!}}} |
|
|
|
|
|
|
|
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
|
|