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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Yamabushi
Apprentice


Joined: 29 Jul 2003
Posts: 101
Location: USA

PostPosted: Thu Nov 02, 2006 12:10 am   

[1.12] bug while making an aliases
 
I was trying to make an alias called nowimp

the commands the alias excecute are
wimpy off
set prompt $HIR$$HE $X>

the set prompt should just pass through directly to the mud, but it crashes the client when I try to use it.
_________________
Yama
Reply with quote
Strakc
Apprentice


Joined: 31 Jan 2006
Posts: 106
Location: Virginia Beach, Virginia

PostPosted: Thu Nov 02, 2006 1:47 am   
 
I think your problem is the fact your using $, I think somewhere around here it was mentioned that $ is for... local variables? if that is so that could be causing your problem? it might be possible to escape it, ~$ should get it to send to the mud as is I do believe, not sure. Hope this helps a bit?
Reply with quote
Yamabushi
Apprentice


Joined: 29 Jul 2003
Posts: 101
Location: USA

PostPosted: Thu Nov 02, 2006 2:09 am   
 
I hope so too, because $HE is how your set your prompt in the mud I'm on.

Also, I've had some problems with another expression I used to use.

My Room (n, w, e, and s) is the room name. Now the directions can be jumbled to whatever combination.

In zmud, I could use #TRIG {My Room \(\T+, \T+, \T+ and \T+\)} to capture it and do a standard subsitution.

Right now it doesn't seem \T+ works, is there an subsitution for that variable?

Thanks
_________________
Yama
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Thu Nov 02, 2006 3:16 am   
 
Also, you could try putting stuff you want sent to the MUD verbatim in double quotation marks, "like this".
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Nov 02, 2006 5:40 pm   
 
Seb is correct. If you want something sent to the MUD that contains special characters, like $, %, @, #, etc, you either need to enclose the entire command in double-quotes, or use the new line-escape ` character at the beginning of the line. I prefer the ` key myself. So your alias commands would look like this:

wimpy off
`set prompt $HIR$$HE $X>

or, you can do this:

wimpy off
set prompt "$HIR$$HE $X>"

and the quotes will be stripped before sending it to the MUD.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Nov 02, 2006 10:07 pm   
 
Quick question of a too-late nature: how come you didn't set the line-escape character the same as the quote character (which we had to use to send commands that matched alias names)? Both appear to provide the same function, just on different scopes
_________________
EDIT: I didn't like my old signature
Reply with quote
Yamabushi
Apprentice


Joined: 29 Jul 2003
Posts: 101
Location: USA

PostPosted: Fri Nov 03, 2006 3:00 am   
 
ok the quotes worked to fix that problem...

Thanks
_________________
Yama
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Nov 03, 2006 5:34 pm   
 
Because the quote character ~ only quotes the next character. The ` character quotes the entire line.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Nov 03, 2006 11:46 pm   
 
Wouldn't that be for the smart parser to decide? Oh, wait, I think I see now. I guess it's the one case where you only want to quote the character and that character happens to be at the beginning of the line? Something like ~! @friend?
_________________
EDIT: I didn't like my old signature
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sat Nov 04, 2006 6:25 am   
 
Correct.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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