
Voila mon code :
- Code: Select all
function on.paint(gc)
Balls:paint(gc)
end
---------------------------
--------- CLASSES ---------
---------------------------
Balls = class()
function Balls:init(x,y,ax,ay,img)
self.x = x
self.y = y
self.ax = ax
self.ay = ay
self.img = img
end
tBalls = { Balls(w/2,h-10,0,0,ball) }
function Balls:paint(gc)
for k=1,#tBalls do
gc:drawImage(self.img,self.x,self.y)
end
end
Et voila l'erreur que ça me renvoie :
- Code: Select all
bad argument #1 to 'drawImage' (TI.Image expected, got nil)
Merci de votre aide
