I'm trying to pass a canvas id to a function. The canvas id is an userdata, but inside the function, it become a number.
So i get an error. Sorry for the noob question but what should i do to keep my canvas id usable by my function ?
I don't even know what you mean by a canvas id, because canvases are objects and can be used the way you're trying to use them. If you get a number instead of an object, maybe you're passing one number too much to your function and the canvas is in the fifth parameter instead of fourth. This code does not give any error: