プレイ日記
Josiah Spike4
Why doesn't this save work? I'm trying to get it to save a numerical variable for when you come back into the program.
0そうだね
プレイ済み
返信[1]
親投稿
NightGamer JesusSavesNow
i have a question, did u release the fps game u were working on?
0そうだね
プレイ済み
返信[2]
親投稿
Josiah Spike4
Not yet, I can't figure out how to make a working AI and some other problems. I hope to finish it someday though.
1そうだね
プレイ済み
返信[3]
親投稿
NightGamer JesusSavesNow
nice, i'm getting hyped
0そうだね
プレイ済み
返信[4]
親投稿
Oscar PwnageBlock
You can only save numerical arrays, not individual variables. However, all you need to do to solve this is place the value you want to save in an array. Like this... DIM SAVARR[1] SAVARR[0]=MONEY SAVE "DAT:RECORDS",SAVARR When loading it back up, you also need to use an array. Remember that.
1そうだね
プレイ済み
返信[5]
親投稿
Josiah Spike4
Okay, thank you :) Thank you for commenting on this community and keeping it alive as well :D
0そうだね
プレイ済み
返信[6]
親投稿
Josiah Spike4
?Question?- How would I load the array and turn it back into a variable?
0そうだね
プレイ済み
返信[7]
親投稿
Oscar PwnageBlock
It's pretty much the backwards process of saving it. First, you would have to declare an array. The array will resize automatically, so you should start the array with size 0. Then, you'd call the LOAD instruction, specifying the declared array. The loaded variables will then be put within the array in the same order as you saved them. You can now recover all the variables you saved.
0そうだね
プレイ済み
返信[8]
親投稿
Oscar PwnageBlock
You have to be wary that trying to load a file that doesn't exist will result in an error. To prevent this, you should check if the file exists with CHKFILE. This instruction returns a boolean value, so you can put it in an IF statement. Your load block would look like this... IF CHKFILE("DAT:RECORDS") THEN DIM LOADARR[0] LOAD "DAT:RECORDS",LOADARR,FALSE MONEY=LOADARR[0] ENDIF
0そうだね
プレイ済み
返信[9]
親投稿
Thomas Pigelephant
[Offtopic] Are you still working on your FPS title? I've been keeping an eye on your miiverse profile. I can't wait !
0そうだね
プレイ済み
返信[10]
親投稿
Josiah Spike4
I am working on the fps, just not at the moment. I just released a beta of a game I have been making lately. I am having trouble with the Ai in the fps right now and am trying to figure it out. Thank you, Oscar, it worked and I have released the beta to this game :D
1そうだね
プレイ済み