Difference between revisions of "variable"

(added an example)
m
Line 8: Line 8:
 
time = time + 1
 
time = time + 1
 
end
 
end
 +
</source>
 +
 +
==See Also==
 +
[[love.mousepressed]]

Revision as of 15:48, 18 June 2013

A variable is a value like val, var, and any other letter or word that is not already assigned to something else.

Example

Changes a variable by 1 each time the left mouse button is clicked

function love.mousepressed( x, y, button )
if button == "l" then
time = time + 1
end

See Also

love.mousepressed