|
Palek Wanderer
Joined: 28 Sep 2005 Posts: 55
|
Posted: Fri May 13, 2011 4:15 am
Need a little help |
When using this code in a macro:
Code: |
$Test = {%char}
#SHOW $Test
#IF ($Test=%lower(palek)) {
#SEND {heal %char}
#EXIT
} {#PRINT Not Me}
#IF (%char=%lower(krimbal)) {
#SEND {first %char}
#EXIT
} {#PRINT Not Me} |
I get this results when hitting the macro key it is assigned to:
Palek
Not Me
Not Me
Here is the capture from the debugger:
0.0007 | l SWMud | Macro "F4" compiled (Normal) : $Test = {%char} #SHOW $Test #IF ($Test=%lower(palek)) { #...
0.0002 | c SWMud | exec : Macro "F4" : $Test = {%char} #SHOW $Test #IF ($Test=%lowe...
0.0002 | n SWMud | Exec Macro "F4"
0.0004 | a SWMud |Palek
0.0011 | a SWMud |Not Me
0.0002 | h SWMud |<ESC>[1SNot Me<ESC>[0m
0.0010 | a SWMud |Not Me
0.0004 | h SWMud |<ESC>[1SNot Me<ESC>[0m
Any help would be appreciated.
Palek |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Fri May 13, 2011 11:34 am |
#IF ($Test=%lower(palek)) is wrong
#IF (%lower($Test)=palek) is right
You also want to change
#IF (%char=%lower(krimbal))
to
#IF (%lower(%char)=krimbal) |
|
_________________ Taz :) |
|
|
|
Palek Wanderer
Joined: 28 Sep 2005 Posts: 55
|
Posted: Fri May 13, 2011 3:41 pm |
facepalms and goes back to his corner, thanks ;)
|
|
|
|
martyall Newbie
Joined: 17 May 2011 Posts: 3
|
Posted: Wed May 18, 2011 4:08 am |
Taz wrote: |
#IF ($Test=%lower(palek)) is wrong
#IF (%lower($Test)=palek) is right
You also want to change
#IF (%char=%lower(krimbal))
to
#IF (%lower(%char)=krimbal) |
I've tried it also. And it works. Thanks Taz. :D |
|
|
|
|
|