20.04.2010, 18:53
Hey Leute
Hab ein Problem mit LUA...
Wenn ich das jetzt ausführe, kommt die Fehlermeldung...
"...Attempt to index global 'image' (a nil value)..."
Ich versteh schon, dass der Intepreter irgendwas versucht... ^^
Weiß da jemand über die Lösung bescheid???
Hab ein Problem mit LUA...
Code (anzeigen)
Code:
ld1 = image.load("img/ld/ld1.png")
ld2 = image.load("img/ld/ld2.png")
ld3 = image.load("img/ld/ld3.png")
ld4 = image.load("img/ld/ld4.png")
ld5 = image.load("img/ld/ld5.png")
ld6 = image.load("img/ld/ld6.png")
ld7 = image.load("img/ld/ld7.png")
ld8 = image.load("img/ld/ld8.png")
timerload = Timer.new()
runtime = timerload:time()
i = 1
while true do
while i <= 5 do
timerload:start()
if runtime >= 0 and runtime < 100 then
screen:blit(0,0,ld1,true)
end
if runtime >= 100 and runtime < 200 then
screen:blit(0,0,ld2,true)
end
if runtime >= 200 and runtime < 300 then
screen:blit(0,0,ld3,true)
end
if runtime >= 300 and runtime < 400 then
screen:blit(0,0,ld4,true)
end
if runtime >= 400 and runtime < 500 then
screen:blit(0,0,ld5,true)
end
if runtime >= 500 and runtime < 600 then
screen:blit(0,0,ld6,true)
end
if runtime >= 600 and runtime < 700 then
screen:blit(0,0,ld7,true)
end
if runtime >= 700 and runtime < 800 then
screen:blit(0,0,ld8,true)
end
if runtime >= 800 then
timerload:stop()
timerload:reset(0)
end
i = i + 1
end
screen.flip()
screen.waitVblankStart()
end
Wenn ich das jetzt ausführe, kommt die Fehlermeldung...
"...Attempt to index global 'image' (a nil value)..."
Ich versteh schon, dass der Intepreter irgendwas versucht... ^^
Weiß da jemand über die Lösung bescheid???