okay, After trying.
Write the following code.
Save the file sizes is small. right ?
When loaded, It does not load (Load Fail !!!).
Pleas help. T_T
_SaveGame:
if file exist("save\SaveGame.dat")=1 then delete file "save\SaveGame.dat"
open to write 1,"save\SaveGame.dat"
write float 1,object position x(charector)
write float 1,object position y(charector)
write float 1,object position z(charector)
write float 1,object angle x(charector)
write float 1,object angle y(charector)
write float 1,object angle z(charector)
write float 1,energy#
write float 1,limitp#
write float 1,ex1#
write float 1,ex2#
write float 1,ex3#
write float 1,speed#
write float 1,e1#
write float 1,e2#
write float 1,e3#
write float 1,e4#
write float 1,e5#
write float 1,e6#
write float 1,time#
write float 1,t#
write long 1,level
write long 1,item1
write long 1,item2
write long 1,bonus
close file 1
wait 1000
if file exist("save\SaveGame.dat")=1
center text 320,320," Save Success !!!"
sync
wait key
else
center text 320,320," Save Fail !!!"
sync
wait key
endif
return
_LoadGame:
filename$= "C:\Program Files\dark\Projects\Mote4\save\SaveGame.dat"
if file exist("filename$")=1
open to read 1,filename$
read float 1,posx#
read float 1,posy#
read float 1,posz#
read float 1,anglex#
read float 1,angley#
read float 1,anglez#
position object charector,posx#,posy#,posz#
xrotate object charector,anglex#
yrotate object charector,angley#
zrotate object charector,anglez#
read float 1,posx#
read float 1,posy#
read float 1,posz#
read float 1,anglex#
read float 1,angley#
read float 1,anglez#
read float 1,energy#
read float 1,limitp#
read float 1,ex1#
read float 1,ex2#
read float 1,ex3#
read float 1,speed#
read float 1,e1#
read float 1,e2#
read float 1,e3#
read float 1,e4#
read float 1,e5#
read float 1,e6#
read float 1,time#
read float 1,t#
read long 1,level
read long 1,item1
read long 1,item2
read long 1,bonus
close file 1
wait 1000
else
if file exist("filename$")=1
center text 320,320," Load Success !!!"
sync
wait key
else
center text 320,320," Load Fail !!!"
sync
wait key
endif
endif
return
...