 |
kjaerhus Magician

Joined: 18 Dec 2006 Posts: 317 Location: Denmark
|
Posted: 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? |
|
|
 |
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: 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? |
|
|
 |
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Wed Aug 06, 2008 4:00 pm |
Yes, please give us the entire code kjaerhus, together with the expected result and the actual result.
|
|
|
 |
kjaerhus Magician

Joined: 18 Dec 2006 Posts: 317 Location: Denmark
|
Posted: Wed Aug 06, 2008 4:02 pm |
Well, it doesn't work for me. Are you using 2.35?
|
|
|
 |
kjaerhus Magician

Joined: 18 Dec 2006 Posts: 317 Location: Denmark
|
Posted: 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. 
|
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: 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.
|
|
|
 |
kjaerhus Magician

Joined: 18 Dec 2006 Posts: 317 Location: Denmark
|
Posted: 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.
|
|
|
 |
|
|