|
Darkwytch Novice
Joined: 20 Feb 2004 Posts: 41 Location: USA
|
Posted: Sat Jul 03, 2004 1:32 am
#if |
I have read the #if help file, and Im not fully grasping how to do something I want to do.
This is what I would like to do. I MUD I play on is Materia Magica.
Here is the text ....
[Clan]Testname has entered Mageria Magica.
What I want to do is make a trigger like this some how.
#trigger {^~[Clan~] (%w) has entered Mageria Magica.} {[here is what im getting stuck on] #if (%1 = Testname} {thendonothinghere}{thendosomethinghere = 0}
If possible explain to me what im doing wrong.... im not sure why its not working...
by the way the one with the " thendosomethinghere = 0 " is the thing that it needs to do to work off a trigger which resets to 0 when I log in. |
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Sat Jul 03, 2004 3:06 am |
Assuming you have variable called Testname, this would be your if...
#if ("%1" <> @Testname) {do something}
If you're just using the name and not a variable, change it to this instead...
#if ("%1" <> "Testname") {do something}
(Note: the <> means 'not equal') |
|
|
|
Darkwytch Novice
Joined: 20 Feb 2004 Posts: 41 Location: USA
|
Posted: Sat Jul 03, 2004 6:02 am |
Thanks!
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Jul 03, 2004 7:23 am |
Larkin's way is better, but here's what you had wrong:
Your version:
#trigger {^~[Clan~] (%w) has entered Mageria Magica.} {#if (%1 = Testname} {thendonothinghere}{thendosomethinghere = 0}
Correct version:
#trigger {^~[Clan~] (%w) has entered Mageria Magica.} {#if (%1 = Testname} {thendonothinghere} {thendosomethinghere = 0}}
You left out a space and a }. Either mistake is enough to prevent the trigger from working as intended. |
|
|
|
|
|