Infinite point bug

From IFWiki
Jump to: navigation, search

An infinite point bug is a programming error that can occur in games that award points for performing certain actions. Typically, a game should only award points when the PC performs a scoring action the first time. If points are awarded every time the PC performs the scoring action, then the player can easily earn as many points as he or she likes, simply by doing that action over and over again.

This bug is most likely to occur with simple, easy-to-repeat actions such as TAKE [object]. For example, if a game awards you 5 points for taking a diamond from a coal mine, try dropping it and picking it up again. If you earn 5 more points, the game has an infinite point bug.

This bug is usually fixed by using a flag variable or property that is set and tested at the appropriate places in the program code.