while true do
screen.waitVblankStart()
--Si pulsamos el boton X se acaba
pad=Controls.read()
if pad:start() then
break
end
if pad:triangle() then
screen:clear()
screen:blit(0, 0,Image.load("imagen/juego01.jpg"))
screen.flip()
end
if pad:l() then
screen:clear()
screen:blit(0, 0,Image.load("imagen/juego02.jpg"))
screen.flip()
end
if pad:r() then
screen:clear()
screen:blit(0, 0,Image.load("imagen/juego03.jpg"))
screen.flip()
end
if pad:circle() then
screen:clear()
screen:blit(0, 0,Image.load("imagen/juego04.jpg"))
screen.flip()
end
end
The program only changes the image when a button is pressed. Why the lua player crashes with "too many open files" error? Need I close the image loaded?
What´s wrong with the images?
Moderators: Shine, Insert_witty_name