Can no longer take screenshots with last love2d version
Posted: Mon Feb 03, 2020 10:59 am
Hello I'm stuck on a problem that should be easy to overcome. I used to run a script that take screenshots of the window on my old computer which was unable to run love2d past the 10.0 version. Now I have a new computer and the last love2d ans apparently I have to use love.graphics.captureScreenshot instead of love.graphics.newScreenshot.
But when I do that there's no image in the target folder folder. In my old code I have another line screenshot:encode('png', os.time() .. '.png') but if I use it now it crashes saying the golbal "screenshot" in a nil value BUT there's is an image created, an actual screenshot of the crash message.
I'm oblivious to the problem and I'd appreciate your help. The attached code is short and very easy to understand.
But when I do that there's no image in the target folder folder. In my old code I have another line screenshot:encode('png', os.time() .. '.png') but if I use it now it crashes saying the golbal "screenshot" in a nil value BUT there's is an image created, an actual screenshot of the crash message.
I'm oblivious to the problem and I'd appreciate your help. The attached code is short and very easy to understand.