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
Kainen
Newbie


Joined: 25 Jun 2007
Posts: 6
Location: Michigan

PostPosted: Mon Oct 29, 2007 7:28 pm   

Continuing problems with variables
 
While trying to set up a global alias, I have been unable to set the correct variable to send the text of the message to the mud itself.

So something like:

In the Package Editor, it would be;
Alias name: Geek
Setting: <Uber-Geek> 'Variable' <4 Hire>

Input: Geek 'Message'

Output:
<Uber-Geek> 'Message' <4 Hire>

In Zmud you could accomplish this by setting the %0 variable between the two sections, but I don't know how to do it with CMUD.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Oct 29, 2007 7:40 pm   
 
%0 should also still work, even though it was never truly supported in zMud and I believe still considered unsupported in CMud. The correct thing to use is %-1 and this should without any trouble.
#ALIAS Geek {#SEND { '%-1' <4 Hire>}}
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Kainen
Newbie


Joined: 25 Jun 2007
Posts: 6
Location: Michigan

PostPosted: Mon Oct 29, 2007 9:49 pm   
 
When I try this, the %-1 isn't translated into a variable. How would I add this into the package editor directly?

Name/descriptor for alias: Geek
What is the script text? For it?

Do I have to define the variable somehow under the Variable section? And if I am adding color codes, how do I get around the fact they are done with unmatched braces?
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Mon Oct 29, 2007 10:11 pm   
 
When you say it's not translated to a variable do you mean you want to create a variable with the value of what you wrote after 'Geek'?
Vijilante's should work fine, but if you want to create a variable first then try
#ALIAS Geek {geekMessage = %-1;~<Uber Geek~> @geekMessage ~<4 Hire~>}

Another thought was maybe since Vijilante was using #SEND then you weren't seeing the altered text being sent - if you want to see what's sent and don't want the variable then try
#ALIAS Geek {~<Uber Geek~> %-1 ~<4 Hire~>}
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
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