|
harleyx Newbie
Joined: 28 Aug 2003 Posts: 8 Location: USA
|
Posted: 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. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
harleyx Newbie
Joined: 28 Aug 2003 Posts: 8 Location: USA
|
Posted: 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. |
|
|
|
|
|