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

Back to Reference

offsetScoreValue Function

Increases or decreases the value associated with a specific score value by a certain amount.

Syntax
offsetScoreValue(valType, delta);
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.
delta
The number to add to the current score value. A negative number means the score value will decrease.
Returns

There is no return value.

Remarks

Use this function to use TQS's built-in scoring functionalities in your custom location types. The setScoreValue function is used for setting a particular score value to a specific number.

Example

offsetScoreValue(0, 1);
if(correctAnswer)
  offsetScoreValue(1, 1);
else
  offsetScoreValue(2, 1);

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