トピック
Kenny Kenny3DSXL

Storing Data for Future Use

How do I store a variable's data for future use, such as a high score?
1そうだね
プレイ済み
返信[1]
親投稿
Oscar PwnageBlock
Use the SAVE command. You can save numerical arrays as DAT files by following this syntax... DIM SAVARR[1] 'DECLARE AN ARRAY WITH THE SIZE BEING THE NUMBER OF VARIABLES YOU WANT TO SAVE SAVARR[0]=HIGHSCORE 'PLACE ALL THE VARIABLES YOU WANT TO SAVE IN THE ARRAY SAVE "DAT:<File Name>",SAVARR 'YOU CAN THEN SAVE THE FILE WITH ANY NAME YOU WANT
0そうだね
プレイ済み
返信[2]
親投稿
Oscar PwnageBlock
Loading back the file is also very easy! You can use the LOAD command. It follows a very similar syntax... DIM LOADARR[0] 'AN ARRAY TO LOAD UP THE VARIABLES IN. YOU CAN SET THE SIZE AS 0 LOAD "DAT:<File Name>",LOADARR 'LOAD THE FILE BACK WITH THE SAME NAME YOU SAVED IT WITH HIGHSCORE=LOADARR[0] 'RETRIEVE ALL THE SAVED VARIABLES
0そうだね
プレイ済み