Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Palek
Wanderer


Joined: 28 Sep 2005
Posts: 55

PostPosted: 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
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: 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 :)
Reply with quote
Palek
Wanderer


Joined: 28 Sep 2005
Posts: 55

PostPosted: Fri May 13, 2011 3:41 pm   
 
facepalms and goes back to his corner, thanks ;)
Reply with quote
martyall
Newbie


Joined: 17 May 2011
Posts: 3

PostPosted: 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
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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