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
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4692
Location: Pensacola, FL, USA

PostPosted: Sun Apr 19, 2009 10:04 am   

[3.06] #PROMPT vs $local
 
#PROMPT $test "anything"
#SAY $test

as you can see, it doesn't retain the value past the #PROMPT itself, if it ever even got made.
_________________
Discord: Shalimarwildcat
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: Sun Apr 19, 2009 8:42 pm   
 
Since #PROMPT expects a regular variable name without @, it looks like you want it to write data to @{$test} variable.

$test = "Before #PROMPT"
#PROMPT $test "anything"
#SAY $test

You can see that $test value was not affected by #PROMPT
_________________
My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4692
Location: Pensacola, FL, USA

PostPosted: Sun Apr 19, 2009 8:53 pm   
 
That is the bug i am referring to, that #PROMPT does not work with local variables.
_________________
Discord: Shalimarwildcat
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: Sun Apr 19, 2009 9:30 pm   
 
I think it is by design, not a bug. Anyway I'm not against local variables in #PROMPT in the future.
_________________
My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads
Reply with quote
wrym
Magician


Joined: 06 Jul 2007
Posts: 349
Location: The big palace, My own lil world

PostPosted: Sun Apr 19, 2009 9:49 pm   
 
For local varibles you can use the %prompt function, and i'm thinking too that this was by design, not that I can remember why.

Code:
$test = "blah"
$test = %prompt($test,"Whoho, test message",)
#print $test


Is what your looking for I think.
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Apr 20, 2009 5:35 pm   
 
There is no way for #PROMPT to handle local variables. You must use %prompt as shown above.
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