YoYo Games Wiki

score

From YoYoGames Wiki

Description

(real): the score a player has achieved in the game

Explanation

This is a built in variable that holds the score for your game, there is no need to declare it.

Example

This will add 5 to the number already in the score variable. So if score was 10, score would now be 15:

 score += 5; 

This will set the score to 5.

 score = 5; 

Remarks

Note that internally score is stored as 4-byte integer with range -2147483648 to 2147483647. However setting it to value like 3000000000 just makes it negative due to integer overflow.

Content from GMKB, was used to expand this article. The content was contributed by nickydude.