var.unmonitor

From Inspired-Lua Wiki
Jump to: navigation, search

var.unmonitor is a function that is part of the Var Library.


This function turns off monitoring of a variable (given in the arguments).

Syntax[edit]

var.monitor(varname)
disables monitoring of the variable varname (must be a string).

Example[edit]

function on.create()
	var.monitor("sol")
	--turn monitoring on for the variable "sol"
end
 
function on.varChange(list)
	--The variable got changed
	var.unmonitor("sol")
	--Turn the monitoring off
	return 0 -- allow the change
end

See also[edit]