Save and Load .bat game

后端 未结 7 1651
予麋鹿
予麋鹿 2020-12-05 21:13

I\'m making a text game written in bat, and the game has been done, (or more, a good part of it, such as the commands, and at the stage where you can play it); however, I wa

7条回答
  •  囚心锁ツ
    2020-12-05 21:19

    Or


    @echo off
    > savegame.bat echo.SET ITEMS=%ITEMS%
    >> savegame.bat echo.SET HEALTH=%HEALTH%
    >> savegame.bat echo.SET MONEY=%MONEY%
    >> savegame.bat echo.SET LEVEL=%LEVEL%


    The Words in Bold Are The Variables to be Written on the bat file.

    The "savegame.bat" is where you will put the file's name that the Variables will be saved to.

    And lastly the > Arrow mean that it will delete everything and start from the beginning of the file as of the >> arrow is telling it to add that line to the very end of all the writing at the very bottom of the file.

    I Hope This Helps, as-well as Help anyone else who has the same question :D

提交回复
热议问题