|
XonDK Apprentice
Joined: 01 Dec 2006 Posts: 178
|
Posted: Mon Jan 30, 2012 8:38 pm
%gmcp.char.vitals.whatever convert string/json to decimal |
So I'm obviously playing around with cmud and gmcp and am hitting a block, namely that when I try to assign a variable with either
variablename=%gmcp.char.vitals.tree
OR
#VA variablename %gmcp.char.vitals.tree
it ends up turning a decimal variable into a string/json, and I don't want that, even setting the variable to be a decimal doesn't help, it just changes the type back to auto when its set by the trigger.
anyone got any experience with this? |
|
|
|
hogarius Adept
Joined: 29 Jan 2003 Posts: 221 Location: islands.genesismuds.org
|
Posted: Mon Jan 30, 2012 9:00 pm |
Perhaps you can use the %vartype function.
Code: |
variablename=%gmcp.char.vitals.tree
#CALL %vartype(variablename,7)
|
|
|
|
|
XonDK Apprentice
Joined: 01 Dec 2006 Posts: 178
|
Posted: Tue Jan 31, 2012 12:50 pm |
hmm that works, just need to do it with everything i get from gmcp.
|
|
|
|
XonDK Apprentice
Joined: 01 Dec 2006 Posts: 178
|
Posted: Wed Feb 01, 2012 7:29 pm |
hogarius wrote: |
Perhaps you can use the %vartype function.
Code: |
variablename=%gmcp.char.vitals.tree
#CALL %vartype(variablename,7)
|
|
Will CALL slow down my scripts significantly or is it so little it doesn't matter, if I were to say get a lot of data from gmcp every prompt? |
|
|
|
|
|