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
kjaerhus
Magician


Joined: 18 Dec 2006
Posts: 317
Location: Denmark

PostPosted: Wed Aug 06, 2008 3:19 pm   

Something happened to %exec?
 
I used to use this function to give me the text that would be sent to the mud for a certain command. For instance if I used aliases in the command this would be parsed.

%exec(pb corn)

would thus return:

put my corn in my bag

Now it seems this doesn't work anymore. Is the behavior of this function changed deliberately and if so why?
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: Wed Aug 06, 2008 3:53 pm   
 
Code:
#ALIAS pb {put my %1 in my bag}
testVar = %exec("pb corn")
#PRINT @testVar


Output:
put my corn in my bag

So what exactly does not work?
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Wed Aug 06, 2008 4:00 pm   
 
Yes, please give us the entire code kjaerhus, together with the expected result and the actual result.
Reply with quote
kjaerhus
Magician


Joined: 18 Dec 2006
Posts: 317
Location: Denmark

PostPosted: Wed Aug 06, 2008 4:02 pm   
 
Well, it doesn't work for me. Are you using 2.35?
Reply with quote
kjaerhus
Magician


Joined: 18 Dec 2006
Posts: 317
Location: Denmark

PostPosted: Wed Aug 06, 2008 4:32 pm   
 
Perhaps it's just me. I've worked a bit more with it and it seems to do the job somehow, although I am a bit puzzled by some behavior of the function. If anyone knows of any change I'd like to know. Otherwise don't bother about it. Confused
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed Aug 06, 2008 4:48 pm   
 
The difference between Kjaerhus' and Arde's is the presence of quotation marks. Putting quotation marks around the text makes it work.
Reply with quote
kjaerhus
Magician


Joined: 18 Dec 2006
Posts: 317
Location: Denmark

PostPosted: Wed Aug 06, 2008 5:39 pm   
 
True, although it was just my example that was bad. My code is a bit more complex and I found something else that could explain my experience.
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