1.

Solve : Saving and resuming for batch RPG?

Answer»

Hey, I have began working on a batch RPG and I can't SEEM to find any information on how to make code where it saves where you left off, maybe like a resuming code, but I can't seem to find any INFO on that.It depends entirely on your RPG code - but essentially you can echo each variable into a text file and read the text file when you need to restore the variables.Say you had 3 variables called power, voltage and ENERGY

you could save them like this

if exist save.txt del save.txt
echo power=%power% >> save.txt
echo voltage=%voltage% >> save.txt
echo energy=%energy% >> save.txt

and read them back like this

for /f "delims=" %%A in (save.txt) do set %%A



Discussion

No Comment Found