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


Joined: 28 Aug 2003
Posts: 8
Location: USA

PostPosted: Sat Jan 14, 2012 5:00 pm   

Been wrestling with this #IF statement problem for 2 hours now
 
Using zMud 7.21 on Windows 7

@decreasingNumber is a number that decreases everytime the action fires
@repeatAction is the action I want to fire everytime @decreasingNumber is still above 20, and otherwise to beep

This is what I have inside a trigger. It's the only part of the trigger not working. The #if statement is not evaluating.

Code:
#if (@decreasingNumber > 20) {@repeatAction}{#BEEP}


I've tried dozens of variations of this, read several dozen posts from searches for clues, and still can't get this to work.
I've checked all my variables. @decreasingNumber is decreasing as it should, and the string variables are set properly.
I tried if as a command (#if, #IF) and a fuction (%if, %IF). I've tried forcing evalauation using [] and %eval, such as..

Code:
#if ([@decreasingNumber > 20]) {@repeatAction}{#BEEP}


This has just caused zMud to output {the action}{#BEEP} to the screen, brackets and all.

I don't have a clue at this point what I'm doing wrong.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Jan 14, 2012 5:21 pm   
 
You are missing a space between the true and false code blocks.
_________________
EDIT: I didn't like my old signature
Reply with quote
harleyx
Newbie


Joined: 28 Aug 2003
Posts: 8
Location: USA

PostPosted: Sat Jan 14, 2012 5:26 pm   
 
MattLofton wrote:
You are missing a space between the true and false code blocks.


Wow. I swore I tried that. Works like a charm. Thank you very much.
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