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
XonDK
Apprentice


Joined: 01 Dec 2006
Posts: 178

PostPosted: 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?
Reply with quote
hogarius
Adept


Joined: 29 Jan 2003
Posts: 221
Location: islands.genesismuds.org

PostPosted: Mon Jan 30, 2012 9:00 pm   
 
Perhaps you can use the %vartype function.
Code:

variablename=%gmcp.char.vitals.tree
#CALL %vartype(variablename,7)

Reply with quote
XonDK
Apprentice


Joined: 01 Dec 2006
Posts: 178

PostPosted: Tue Jan 31, 2012 12:50 pm   
 
hmm that works, just need to do it with everything i get from gmcp.
Reply with quote
XonDK
Apprentice


Joined: 01 Dec 2006
Posts: 178

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