integer TRUE = 1;

The integer constant TRUE has the value 1.


		if (llGetScriptState("anotherscript") == TRUE)
			llSetScriptState("anotherscript", FALSE);


Though it is an integer constant, it's use is intended for boolean comparisons or as parameter for functions, that require a boolean value.


The value 1 can be used instead of the constant TRUE, which is a major difference to some professional programming languages. Still it is suggested, to avoid using 1 instead of TRUE, as it makes more readable code and avoids problems, where scripts could break because of future changes.

Using TRUE and FALSE in boolean expressions, where functions return those values, makes code more readable and failsafe, even if it's correct syntax to write the above example as:

if (llGetScriptState("anotherscript"))

The contrary to TRUE is FALSE.

Related Constants

  • FALSE - An integer constant of value 0 for boolean comparisons


SecondLife (agni), Secondlife (aditi), OpenSimulator

See alsoEdit

  • TRUE - Constant reference at SecondLife LSL Wiki
  • TRUE - Constant reference at

  Icon-edit-22x22 Read comments or write a new one!