You’re not returning anything from your function call. Also, use local
variables inside functions.
function newImage(Image, posx, posy) local pic = Bitmap.new(Texture.new(Image)) stage: addChild(pic) pic:setPosition(posx,posy) return pic end
You’re not returning anything from your function call. Also, use local
variables inside functions.
function newImage(Image, posx, posy) local pic = Bitmap.new(Texture.new(Image)) stage: addChild(pic) pic:setPosition(posx,posy) return pic end