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


Joined: 24 Nov 2011
Posts: 13
Location: United States

PostPosted: Thu Nov 24, 2011 12:57 am   

Using the equals sign in an alias
 
Okay, so I've created an alias called 'page'. The goal is to make 'page' from MUSHs work on MUDs for me. Please don't tell me exactly how you would do this, that's half the fun for me.

The problem is that typing 'page rabek=Hello' gives 'invalid token: =Hello' even when the alias is empty.

Is there a way to override this? Why is it checking the parameters for equals signs?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Nov 24, 2011 2:50 am   
 
The problem is that, even though you cannot actually HAVE spaces in a variable name, CMud's parser doesn't actually prevent you from trying it. So it sees page rabek= as a variable assignment (which is apparently being checked for before aliases).

If you want to override it, you will probably need to surround such parameters with quotes or quoting the equals sign, like so:

page "rabek=hello"
page rabek~=hello
page rabek"="hello

The alternative is to avoid using the equals sign entirely in the parameters:

page target message
_________________
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