Saving a Screenshot to Pictures Folder

Hello!

I am trying to save a screenshot of my game into the Pictures folder of my laptop. I have tried following the Gdevelop project tutorial’s exact instructions on this, but it is still not working.

I’ve attached a picture of my code. I’ve used the “Take a Screenshot” function and the line: FileSystem::PicturesPath() + FileSystem::PathDelimiter() + “Bubble_Tile_Free_Play_Design.png”

I’ve also added a text box that would show the pathway of the screenshot.

However, when I preview my game and try to take a screenshot, the pathway that the text shows isn’t complete and I can’t find the picture in my computer. The text reads: “Screenshot saved at: /Bubble_Tile_Free_Play_Design.png” – There is no pathway to my pictures folder.

Can you please help me fix this issue? I’m not sure where I’m going wrong. Thank you for your help in advance!!

Hi,
unfortunately I cannot tell you what the problem is, I can only confirm that your events are correct and should work as intended. I tried it with this event:


and it does exactly what it should do: save the screenshot and display the path in the text field. Maybe there is a conflict with another event?
I would try the screenshot-event in a new scene or project, just to see whether it principally works.

Hi, thank you for attempting it yourself! I’ve tried saving a screenshot from the tutorial project, and it does the same thing for me and I can’t find the picture anywhere. Maybe it’s something wrong with my computer?

If it is not working at all, it could be a problem with your computer but I have no idea what it could be. Hopefully someone else has an idea and can chime in.

Okay, thank you for your help!

I’ve tried sending my game to a friend and they were having the same issue with it, so maybe it’s not just my computer. Please if anyone else has any ideas I’m open to them!