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


Joined: 10 Jan 2002
Posts: 8

PostPosted: Fri Jan 11, 2002 11:55 pm   

Button question
 
I have a toggle button with the bitmap as CIRC. When I press it, it executes a command (this part works fine) and then I want the image to change to CIRCG. For this I have: %btnimage (biron, circg)
The image does change, however, in the game it also says Huh? Meaning it sent a command that it didn't understand. After doing some testing I found out that it tries to send the circg to the game. I tried putting quotes around it and it still didn't work. Is there something I need to fix to get it to work properly?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Jan 12, 2002 12:33 am   
 
quote:

I have a toggle button with the bitmap as CIRC. When I press it, it executes a command (this part works fine) and then I want the image to change to CIRCG. For this I have: %btnimage (biron, circg)
The image does change, however, in the game it also says Huh? Meaning it sent a command that it didn't understand. After doing some testing I found out that it tries to send the circg to the game. I tried putting quotes around it and it still didn't work. Is there something I need to fix to get it to work properly?



You don't want JUST %btnimage. You also need #NOOP to prevent it from being sent to the mud.

#NOOP %btnimage(biron, circg)

li'l shmoe of Dragon's Gate MUD
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sat Jan 12, 2002 1:28 pm   
 
Remember, functions do something and return something. If you do not want what is returned to be sent to the MUD, then the function can't be at the beginning of the line. As a rule of thumb, functions never appear at the beginning of the line, they appear withing command. In this case, #NOOP was used because it simply discards whatever the function returns.

Kjata
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