User Tools

Site Tools


var_prefix

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

var_prefix [2012/07/09 23:55] (current)
Line 1: Line 1:
 +====== The var_ prefix ======
  
 +You have to create the variable (money in our example) in Earwigo before you can use it. Use the Variable tab in Earwigo to create your variable.
 +
 +Note that if a variable is called "​money"​ in the Earwigo editor screen, it will be called "​var_money"​ in the Lua code. That's to prevent people who don't know much about Lua accidentally picking a variable name like "​if"​ or "​end"​ and causing all kinds of mayhem with the compiler.
 +
 +The prefix "​var_",​ which is prepended to each variable name, is on the Cartridge/​Properties tab, under "​Variable name prefix"​. You can set it be empty, if you want. Just don't complain when your cartridge'​s variables redefine major globals or clash with keywords. We suggest to use the var_ prefix to stay out of trouble.
var_prefix.txt ยท Last modified: 2012/07/09 23:55 (external edit)