プレイ日記
DerpTias SneekATTACK11
i want to save the numbers inside of SUB but this isnt working.. Could someone please help?
3そうだね
プレイ済み
返信[1]
親投稿
TN21 Trinitro21
Is SUB a numerical value array that was declared with DIM or VAR?
1そうだね
プレイ済み
返信[2]
親投稿
^ This will only save arrays, not single variables ;)
1そうだね
プレイ済み
返信[3]
親投稿
DerpTias SneekATTACK11
im using those a Word (SUB) as somthing that holds a number. SUB=SUB+1 PRINT SUB how would i save that number?
0そうだね
プレイ済み
返信[4]
親投稿
DerpTias SneekATTACK11
i dont talk coding language... i just know hot to code... i have not used DIM or VAR
0そうだね
プレイ済み
返信[5]
親投稿
TN21 Trinitro21
SmileBASIC can't save a single number, but rather only arrays. To save this number, you have a couple of options. You can save with SAVE "TXT:TEST",STR$(SUB) and load it with LOAD "TXT:TEST",FALSE OUT S$:SUB=VAL(S$) You can save with DIM ARR[1]:ARR[0]=SUB:SAVE "DAT:TEST",ARR and load with DIM ARR[1]:LOAD "DAT:TEST",FALSE OUT ARR:SUB=ARR[0]
1そうだね
プレイ済み
返信[6]
親投稿
TN21 Trinitro21
If you choose the second option, however, you'll have to make sure you only use DIM ARR[1] once, preferrably at the start of your program. If you DIM an array more than once, SmileBASIC gives an error.
2そうだね
プレイ済み