I keep getting this reocurring error and it's seriously annoying the f'ing hell out of me.
The error is: "An argument was incorrect."
Can anyone help out?
Here's the code:
Code:function XXX(img,alphacol,maskcol) local width = img:width() local height = img:height() local tempimg = Image.createEmpty(width,height) tempimg:clear(Color.new(255,255,255,0)) for x=0,width do for y=0,height do pixcol = img:pixel(x,y) <-- It's giving the error here if pixcol == alphacol then tempimg:pixel(x, y, maskcol) <-- and here. end end end return tempimg end