|
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Sat Aug 09, 2008 12:02 am
%pick and local variables |
Perhaps I am doing something wrong, but it seems that %pick() will not return a value to a local variable.
Code: |
$mode = %pick( "p:Select session mode","o:1","|*NORMAL|TEST")
#ECHO mode is $mode
|
will echo a null string, while
Code: |
#VAR mode %pick( "p:Select session mode","o:1","|*NORMAL|TEST")
#ECHO mode is @mode
|
will echo the appropriate value.
I am wondering whether it is a bug or the documentation is incomplete.
I am presently running under CMUD 2.35 |
|
_________________ Sic itur ad astra. |
|
|
|
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Mon Aug 11, 2008 9:19 pm |
Your first code block works fine for me when I execute it from the command line...(!) (v2.35)
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Aug 12, 2008 4:39 pm |
Works for me here too, so I'm not sure what is causing the problem for Anaristos.
|
|
|
|
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Wed Aug 13, 2008 5:05 am |
It also works for me now. I don't know what to tell you. I spent quite sometime trying to figure out what was wrong, but the code I posted works for me just fine this time around.
|
|
_________________ Sic itur ad astra. |
|
|
|
|
|