i meant to put
item1 item2 item3 item4 item5
Root / Programming Questions / [.]
@ save DIM Variables[9] variables[1]=item variables[2=item variables[3]=item variables[5 ]=item variables[5]=item so on.. save "dat:rpgsave",variables goto @save @load load "dat:rpgsave",false out variables got loadbut it's saying I have a duplicate variable... and just.... please help.
item1 item2 item3 item4 item5
Put this code near the beginning:I agree with SquareFingers' first statement, (but the rest, seriously?! also that statement about making people want to help you is ironic) you need to supply all the information so that we can help you better. One last thing: there's an edit button so you can fix the first post.VAR SAVE[5]It will make an array (essentially a bunch of variables put into one) that will store your save data. When you want to save, use this:SAVE[0]=ATK SAVE[1]=DEF SAVE[2]=GOLD SAVE[3]=HP SAVE[4]=SP SAVE "DAT:SAVEDATA",SAVEDATAThe first 5 lines put your variables into the array, and the final line saves the array as a DAT file.When you want to load, use this:Side Note
Arrays start with 0 for some reason... If you have an array with 5 things in it, the array will go from 0-4. Odd.LOAD "DAT:SAVEDATA",SAVEDATA,0 ATK=SAVE[0] DEF=SAVE[1] GOLD=SAVE[2] HP=SAVE[3] SP=SAVE[4]If I remember correctly, this will only work with integers. You can't save real numbers as DAT files. (Integers are variables that can't have decimal points and real numbers are the ones that can)
var=10 save[0]=shovel save[1]=item1 save[2]=item2 save[3]=item3 save[4]=item4 save[5]=money save "dat:savedata",savedataand it says type mismatch in 0:78(save:2)
ok so now I haveType Mismatch in 0:78 not o:78 It might be because you didn't use quotations around DAT:SAVEDATA, and DAT:SAVEDATA has to be in caps I am pretty sure. SmileBASICvar=10 save[0]=shovel save[1]=item1 save[2]=item2 save[3]=item3 save[4]=item4 save[5]=money save ''dat:savedata'',savedataand it says type mismatch in o:78(save:2)