|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
|
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: 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 |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
|
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: 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 |
|
|
|
wrym Magician
Joined: 06 Jul 2007 Posts: 349 Location: The big palace, My own lil world
|
Posted: 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. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Apr 20, 2009 5:35 pm |
There is no way for #PROMPT to handle local variables. You must use %prompt as shown above.
|
|
|
|
|
|