Unknown2006-07-03 02:49:55
Hi there, hoping one of you can help me with this.
I set up a system of triggers so that when my legs, arms, etc. are broken a corresponding variable will be set from 0 to 1 (mendlegs, mendarms, mendhead). The cured message will set the variable back to 0. To avoid wasting salve, I wanted to set up a macro that would apply mending to whichever part needed it most: first head, then legs, then arms. If the first part wasn't broken, it would check the second part, etc.
Looking at the examples in the zmud help files, this is what I came up with:
#if (@mendhead=1) {apply mending to head} {#if (@mendlegs=1) {apply mending to legs}{#if (@mendarms=1) {apply mending to arms}}}
On my first time out, an alligator broke my leg and the variable changed as it was supposed to. But when I hit the macro, I got this echo back:
{apply mending to legs}{#if (0=1) {apply mending to arms}}
I'm not quite sure what went wrong. I tried putting in a final false statement, thus:
#if (@mendhead=1) {apply mending to head} {#if (@mendlegs=1) {apply mending to legs}{#if (@mendarms=1) {apply mending to arms}{#echo None of your limbs are broken.}}}
But that didn't work either. Can anyone figure out how I can fix this? It's especially confusing to me because apparently the first part of the trigger went off ok- zmud determined that mendhead was not equal to 1, checked mendlegs and found it DID equal 1, and tried to execute my command. But it didn't work. And when I execute the macro without anything broken, I don't get the echo.
If it matters, I am using Zmud v7.13b Thanks!
I set up a system of triggers so that when my legs, arms, etc. are broken a corresponding variable will be set from 0 to 1 (mendlegs, mendarms, mendhead). The cured message will set the variable back to 0. To avoid wasting salve, I wanted to set up a macro that would apply mending to whichever part needed it most: first head, then legs, then arms. If the first part wasn't broken, it would check the second part, etc.
Looking at the examples in the zmud help files, this is what I came up with:
#if (@mendhead=1) {apply mending to head} {#if (@mendlegs=1) {apply mending to legs}{#if (@mendarms=1) {apply mending to arms}}}
On my first time out, an alligator broke my leg and the variable changed as it was supposed to. But when I hit the macro, I got this echo back:
{apply mending to legs}{#if (0=1) {apply mending to arms}}
I'm not quite sure what went wrong. I tried putting in a final false statement, thus:
#if (@mendhead=1) {apply mending to head} {#if (@mendlegs=1) {apply mending to legs}{#if (@mendarms=1) {apply mending to arms}{#echo None of your limbs are broken.}}}
But that didn't work either. Can anyone figure out how I can fix this? It's especially confusing to me because apparently the first part of the trigger went off ok- zmud determined that mendhead was not equal to 1, checked mendlegs and found it DID equal 1, and tried to execute my command. But it didn't work. And when I execute the macro without anything broken, I don't get the echo.
If it matters, I am using Zmud v7.13b Thanks!
Esano2006-07-03 02:57:30
Tried adding spaces?
Make it:
#if (@mendhead=1) {apply mending to head} {#if (@mendlegs=1) {apply mending to legs} {#if (@mendarms=1) {apply mending to arms}}}
or
#if (@mendhead=1) {apply mending to head} {#if (@mendlegs=1) {apply mending to legs} {#if (@mendarms=1) {apply mending to arms} {#echo None of your limbs are broken.}}}
Not sure if that'll fix it, but try.
Make it:
#if (@mendhead=1) {apply mending to head} {#if (@mendlegs=1) {apply mending to legs} {#if (@mendarms=1) {apply mending to arms}}}
or
#if (@mendhead=1) {apply mending to head} {#if (@mendlegs=1) {apply mending to legs} {#if (@mendarms=1) {apply mending to arms} {#echo None of your limbs are broken.}}}
Not sure if that'll fix it, but try.
Unknown2006-07-03 03:08:01
QUOTE(Esano @ Jul 2 2006, 10:57 PM) 304487
Tried adding spaces?
Make it:
#if (@mendhead=1) {apply mending to head} {#if (@mendlegs=1) {apply mending to legs} {#if (@mendarms=1) {apply mending to arms}}}
or
#if (@mendhead=1) {apply mending to head} {#if (@mendlegs=1) {apply mending to legs} {#if (@mendarms=1) {apply mending to arms} {#echo None of your limbs are broken.}}}
Not sure if that'll fix it, but try.
Fixed! Knew there had to be something staring me in the face that I just couldn't see, somehow. Thanks for the help!