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

Discussion in 'GameMaker Studio 2 Community Tech Support' started by dreenot, Aug 12, 2019.

  1. dreenot

    dreenot Member

    Mar 28, 2018
    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_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
    SupernaturalCow likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice