Having problems with the newScreenshot() feature

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
benj7126
Prole
Posts: 3
Joined: Sun Oct 13, 2019 3:16 pm

Having problems with the newScreenshot() feature

Post by benj7126 »

Hey...

I seem to be having problems with the love.graphics.newScreenshot()

When i run my program it says:
attempt to call field 'newScreenshot' (a nil value)

The example

Code: Select all

function love.load()
    love.filesystem.setIdentity('screenshot_example');
end
 
function love.keypressed()
    local screenshot = love.graphics.newScreenshot();
    screenshot:encode('png', os.time() .. '.png');
end
Btw.
This is me following the example in the love2d wiki

Plz help :?
Attachments
game.love
My game
(1.55 KiB) Downloaded 138 times
Thingy.love
Just the example
(261 Bytes) Downloaded 143 times
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Having problems with the newScreenshot() feature

Post by zorg »

Hi and welcome to the forums.

Did you read the glaring red box at the top of the wiki article? :3

> Removed in LÖVE 11.0
> It has been replaced by love.graphics.captureScreenshot.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
benj7126
Prole
Posts: 3
Joined: Sun Oct 13, 2019 3:16 pm

Re: Having problems with the newScreenshot() feature

Post by benj7126 »

Thx

xD
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 156 guests