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
Gwaethiel
Beginner


Joined: 23 Feb 2011
Posts: 13

PostPosted: Thu Aug 08, 2013 8:15 am   

Alias and gauge problem.
 
Hello! I've got 2 problems, with which i can't deal.

First:

#ALIAS za {zaslon %1 %if(%2,przed %-2)}

It works on zMUD, but not on cMUD. I mean, when i type for example 'za dwarf elf' i've got 'zaslon dwarf przedelf' instead of 'zaslon dwarf przed elf' I don't know why i have no space there.

And second, with gauge. Again, works on zMUD but not on cMUD.

#CLASS {specc}
#TRIGGER {i zaczynasz sie skradac w kierunku} {#alarm lampa {+55}}
#BUTTON 8 {SPEC} {} {} {} {%alarm(lampa)} {} {} {Size} {120} {24} {} {} {} {47} {} {Gauge||12|55000|54000|8} {} "" {Explore|Inset} {} {lampa_b}
#CLASS 0

On zMUD gauge button have progress, on cMUD it's always the same. Can you help me?

EDIT;

Oh, and one more question. How make decrement variable?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Aug 08, 2013 9:49 pm   
 
1)In CMud, extraneous whitespace is ignored. While this means that you can largely format your code however you want, it also means that implicit concatenation doesn't work for preserving spaces. To get around this, surround everything that isn't a variable in double quotes:

%if(%2,"przed "%-2)

3)just assign a number to a variable and then use #ADD varname -x, where x is some number you want to decrement by.
_________________
EDIT: I didn't like my old signature
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