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
Hydrargyrum
Newbie


Joined: 26 Sep 2006
Posts: 2

PostPosted: Tue Sep 26, 2006 10:57 pm   

Help please -> #add and #if
 
Hi,
I've got two problems. The first is:
I want to count something. Therefore I wrote a trigger:
pattern: abc
value: #add test 1

Mudtext:
#var test 0
say abc
You say: abc
#var test -> Variable: test 1 || seems to work, but
#var test 200
say abc
You say: abc
#var test -> Variable: test 1

The command #add does not add something, but set a specific value. What do I do wrong?

The second problem:
I want to use a simple #if-Function, but none works. For example:

Alias:
patter: test1
value: #IF (@gold < 100) {say NO!} {say YES!}

#var gold 200
test1
You say: YES!

#var gold 50
test1
You say: YES!

Same question, what do I do wrong?

I use zMud 7.21.

So long,
Hydrargyrum
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Sep 27, 2006 3:01 am   
 
Do you have more than 1 variable with the same name? It's likely the ones the scripts are finding are different from the ones you are setting for testing purposes. Beyond that or ZMud/your settings file being buggy, your syntax is correct.
_________________
EDIT: I didn't like my old signature
Reply with quote
Hydrargyrum
Newbie


Joined: 26 Sep 2006
Posts: 2

PostPosted: Wed Sep 27, 2006 8:08 am   
 
No, all variables exist only once.

If my mudfile is buggy, what should I do? Reinstall zMud?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Sep 27, 2006 10:18 pm   
 
Don't need to reinstall. Basically, you need to export to text everything in your settings file. Once that is done, delete that mud file and create a new one. After that, import each setting one by one from that text file.

More exact instructions can be found here: http://www.zuggsoft.com/page.php?file=zmud/migrating.htm

Sometimes it's just the ZMud core that's gone glitchy, and a simple reinstall will fix that in most cases.
_________________
EDIT: I didn't like my old signature
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Thu Sep 28, 2006 3:24 pm   
 
Hydrargyrum,
tried it myself as well, cause lord knows if somethings wonky somewhere it would be with mine as well.
It worked fine.
start with a blank profile.
at the char select menu, press escape.
enter the 3 things that you need and see if it still happens.
_________________
http://www.Aardwolf.com
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