• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code sprite_save() no bitmap data available [SOLUTION]

D

dreenot

Guest
I had a problem with this function that took me a long time to figure out.
I read a lot of threads and people didn't get a solution.
So I found this answer in a Russian forum.

The function sprite_save() does not work with sprites created previously in the game.
It only works with dynamically created ones.

This should be specified in the documentation.

But there is an easy solution to do it:

sprite_variable=sprite_duplicate(sprite_name_not_string);
sprite_save(sprite_variable, 0, "name.png");

Remember to include the image index in the second parameter

In my case it was saved in C:\Users\{{Username}}\AppData\Local\project_name
 
Top