|
rabek Beginner
Joined: 24 Nov 2011 Posts: 13 Location: United States
|
Posted: 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? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
|
|