Skip to content
Docs
Errors

studio-variable-scope

A variable is read without its owner, or with an owner it does not have.

KindStudio problem
Reported byStudio validation: the Problems panel, Play, Publish and the MCP validate tool
Code in the Studiovariable-scope

Game variables have one value, written score. Player variables have one value per player, written player.score. Object variables belong to an object, written object.health.

Fix

  • Write player.<name> for a player variable, <object>.<name> for an object variable, and the bare name for a game variable.

See also