WHY is this returning a nil?!

i recently learned lua for a few reason, making scripts with aseprite was one of them, but i started trying and i just butt out here and i have no idea why the hell this isnt working, i even checked the graphiccontext section in the api, but it still makes zero sense why the hell this is returning a new even thought i declared up there

im trying to do something simple yet i cant make this darn thing work.

error log

Hi Ethan, actually we cannot create GraphicsContext at the moment, it’s an object received in the Canvas onpaint event.

This was something requested in the past too: How to draw a sprite with Graphics context

As a pending feature is to get a GraphicsContext from an Image, I’ll see if I can take this one in some free time.

1 Like