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
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: 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.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: 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)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Aug 12, 2008 4:39 pm   
 
Works for me here too, so I'm not sure what is causing the problem for Anaristos.
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: 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.
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