Changes
Jump to navigation
Jump to search
← Older edit
on.varChange
22 bytes added
,
03:30, 18 June 2015
changed create by construction (valid in recent APIs)
Line 18:
Line 18:
This example is about Highscore Saving.<br />
This example is about Highscore Saving.<br />
−
More details here : http://www.inspired-lua.org/2011/08/save-a-high-score-without-cheating-possibility/
+
More details here : http://www.inspired-lua.org
/index.php
/2011/08/save-a-high-score-without-cheating-possibility/
<source lang="lua">
<source lang="lua">
−
function on.
create
()
+
function on.
construction
()
if not var.recall("highscore") then
if not var.recall("highscore") then
highscore = 0
highscore = 0
Line 30:
Line 30:
end
end
−
function on.varChange(
list
)
+
function on.varChange(
varlist
)
−
for k, v in pairs(
list
) do
+
for k, v in pairs(
varlist
) do
if k == "highscore" then
if k == "highscore" then
if var.recall(k) ~= highscore then
if var.recall(k) ~= highscore then
Adriweb
Bureaucrats
,
Administrators
935
edits
Navigation menu
Personal tools
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version