|
Pyron Beginner
Joined: 11 Mar 2003 Posts: 19 Location: USA
|
Posted: Mon Jul 14, 2003 8:33 am
Variables as a command and Special Chars |
I'm basically trying to use a variable as a command, mostly to help make a standard that I can use for multiple triggers. Basically here's what I got:
#tr {^You killed (*).} {#cw bold,red;#beep;@orginfo I have killed %1 at Location: }
The variable 'orginfo' is as such:
org /common/ ~@~[Inform~] :
What this does is issue a command for a channel that should appear as such when all is said and done:
[Scryers] Pyron [Inform] : I have killed Dufus at Location:
What actually appears is:
[Scryers] Pyron ~Inform : I have killed Dufus at Location:
The @ in the variable is necessary for the org command on the mud, as it allows for basically an emote over the channel of your own discretion. What I'm not understanding is why the [ or ] aren't showing up. If I were to issue the same command to the mud, it shows up properly. Any help would be appreciated. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Mon Jul 14, 2003 1:17 pm |
Check that after defining the variables the ~'s are still there. Since expansion occurs twice (once when definin the variable and again when expanding it to send it to the MUD), you might not have inside the variable what you think you have.
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Jul 14, 2003 3:55 pm |
This is usually done with aliases rather than variables.
#AL orginfo {org /common/ ~@~[Inform~] :}
#TR {^You killed (*).} {#CW bold,red;#BEEP;orginfo I have killed %1 at Location: } |
|
|
|
Pyron Beginner
Joined: 11 Mar 2003 Posts: 19 Location: USA
|
Posted: Mon Jul 14, 2003 5:36 pm |
When doing a #sh @orginfo, it returns:
org /common/ ~Inform~ :
So somewhere it's ditching the [ ] chars, and I have no clue why it would do that as the ~ should rectify that.
Using the alias, Lightbulb, is something I didn't think of but will work. But, I still need to find a way to resolve this issue if I can, because after the Location: I use another variable to show what my actual location is, and that isn't displaying the [ ] characters either. I didn't include it in my first post as the solution to the first problem would more than likely fix the second, as they're the same. Any further thoughts would be helpful. Thanks guys. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Jul 14, 2003 6:12 pm |
#TR {^You killed (*).} {#CW bold,red;#BEEP;orginfo I have killed %1 at Location: "["@Location"]"}
|
|
|
|
Pyron Beginner
Joined: 11 Mar 2003 Posts: 19 Location: USA
|
Posted: Wed Jul 16, 2003 1:54 am |
That's the stuff right there. You're the bomb diggity, LightBulb. Thanks.
|
|
|
|
|
|