[SOLVED] Pass a canvas (userdata) to a function
Posted: Wed Mar 22, 2023 1:41 pm
Hi,
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'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 ?
Code: Select all
function draw_9slice(num, width, height, canvas)
love.graphics.setCanvas(canvas)
[...]