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
Darkwytch
Novice


Joined: 20 Feb 2004
Posts: 41
Location: USA

PostPosted: 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.
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: 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')
Reply with quote
Darkwytch
Novice


Joined: 20 Feb 2004
Posts: 41
Location: USA

PostPosted: Sat Jul 03, 2004 6:02 am   
 
Thanks!
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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.
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