TQS Home
Trivia Quiz Shell Version 2.8 Now Available!Bot Productions Home
 
TQS 2.5

Back to Reference

setScoreValue Function

Sets the value associated with a specific score value.

Syntax
setScoreValue(valType, amt);
Parameters

valType
Specifies which score value to change. Can be one of the following values:
0
The number tried.
1
The number correct.
2
The number incorrect.
amt
The number to assign to the score value.
Returns

There is no return value.

Remarks

Use this function to use TQS's built-in scoring functionalities in your custom location types. The offsetScoreValue is well-suited for increasing a particular score value by a given amount.

Example

numTried++;
setScoreValue(0, numTried);
if(correctAnswer)
{
  numCorrect++;
  setScoreValue(1, numCorrect);
} else
{
  numWrong++;
  setScoreValue(2, numWrong);
}


©2016 Bot Productions. All rights reserved.Last Updated: September 9, 2007