Saveing the game
Root / Programming Questions / [.]
KomodoCreated:
VAR SOMEVAR1=1 VAR SOMEVAR2=20 DIM SARRAY[0] PUSH SARRAY,SOMEVAR1 PUSH SARRAY,SOMEVAR2 SAVE "DAT:SAVEFILE",SARRAYThe above saves an array to a data file called, SAVEFILE. Reading this back in is as easy as:
DIM SARRAY[0] LOAD "DAT:SAVEFILE",SARRAY, FALSE ' FALSE suppresses user confirmation dialogI'm not sure what you mean when you say, SAVE doesn't work in edit screen. What problem are you running into?
what does the error message say?
Mine keeps saying duplicate variableThis is usually because you aren't doing an ACLS at the start of your code, so the array is already defined the second time you run your program. (This is assuming that you've already checked your code to make sure you don't have DIM MYARRAY twice, which you will do if you've copied glennxserge's code without reading it)