Hello.
How can i save „h“ „t“ „zt“ „ht“ „m“ and „pres“ in this code??
-- Clickers
displayMode(FULLSCREEN)
-- Use this function to perform your initial setup
function setup()
fontSize(100)
fill(0, 224, 255, 255)
h=0
h=readLocalData("save_h") or 0
t=0
t=readLocalData("save_t") or 0
zt=0
zt=readLocalData("save_zt") or 0
ht=0
ht=readLocalData("save_ht") or 0
m=0
m=readLocalData("save_m") or 0
pres=0
pres=readLocalData("save_pres") or 0
end
-- This function gets called once every frame
function draw()
-- This sets a dark background color
sprite("Cargo Bot:Opening Background",512,384,1024,768)
-- This sets the line thickness
strokeWidth(5)
text("Hundert: "..math.ceil(h), 500, 100)
text("Tausend: "..math.ceil(t), 500, 200)
text("Zentausend: "..math.ceil(zt), 500, 300)
text("Hunderttausend: "..math.ceil(ht), 500, 400)
text("Milionen: "..math.ceil(m), 500, 500)
text("Prestiue: "..math.ceil(pres), 500, 700)
--Aufstufung
if h == 1000 then
t=t+1
h=h-h
end
if t == 10 then
zt=zt+1
t=t-t
end
if zt == 10 then
ht=ht+1
zt=zt-zt
end
if ht == 10 then
m=m+1
ht=ht-ht
end
if m == 1 then
h=h-h
t=t-t
zt=zt-zt
ht=ht-ht
m=m-m
pres=pres+1
end
end
function touched(touch)
if touch.state==BEGAN then
h=h+1
saveLocalData=("save_h"), h
end
end