I was trying to reduce the database footprint by using global variables. My dbmodel.sql file seems to be getting a little big. However, I don't seem to be able to get anything but integers stored with setGameStateValue(). I suppose it would be obvious from the global table definition but it is not really mentioned in the doc or comments. I was assuming I could use these variables for strings too.
In setupNewGame:
In stEndRound:
And by sending descr in a notification, I'm able to see that testing_var=0. I don't seem to be able to store a string or a decimal number.
Are the global GameStateValues always integers?
Thanks, Brian
In setupNewGame:
Code: Select all
self::initGameStateLabels( array(
"testing_var" => 19
) );
// Only accepts integer values. Strings become "0" and decimals are rounded to the nearest integer.
self::setGameStateInitialValue( 'testing_var', "test" );
Code: Select all
$testing_var = $this->getGameStateValue("testing_var");
$descr .= " testing_var=$testing_var";
Are the global GameStateValues always integers?
Thanks, Brian