helper.storeStat
Prototype
function storeStat(statname, playername, value, specialValue, action)
Input parameters
statname - the name of the stat to set
playername - the user name of the player to set the stat for
value - integer value of the stat
specialValue - string value of the stat (or "" if not used)
action - condition for how to set the stat
Return value
null
Description
Stores a stat in the database. statname is the name of the data as defined in the xml file, playername is the user name identifying a player, value an integer value and specialValue a string (can be an empty string but not null). The action parameter defines the criteria for when the integer data should be saved and can be one of the following: REPLACE (always replace), REPLACE_IF_HIGHER, REPLACE_IF_LOWER, ADD_TO or SUBTRACT_FROM. It is possible to attach both an integer value and a string value to a stat. If you don't want to use either the integer or the string just set them to 0 or the empty string ("").
Example code
storeStat("maxCorrectAnswers", player, numCorrectAnswers, "",
REPLACE_IF_HIGHER);
