This is what I do to save in my game loops
save
if keystate(31)=1
printsavegame=1
if file exist(name$+".dat")=1 then delete file name$+".dat"
open to write 1,name$+".dat"
write long 1,coinscolleted
write long 1,health
write long 1,dragonposition
write long 1,positionTaurus
write long 1,coinscolleted
write long 1,points
write long 1,pear
write long 1,orange
write long 1,apple
write long 1,red
write long 1,dragonhealth
write long 1,Taurus1health
write long 1,oz#
for jails=24 to 32
write long 1,jail(jails).state
next jails
write long 1,kitchenend
write long 1,playvideonow
write long 1,kitchenstorage
write long 1,kitchen
write long 1,fanposition
write long 1,cTVal
write long 1,changefruittexture
for x=2 to 2
if object exist (x)
x#=object position x(x)
y#=object position y(x)
z#=object position z(x)
ax#=object angle x(x)
ay#=object angle y(x)
az#=object angle z(x)
write float 1,x#
write float 1,y#
write float 1,z#
write float 1,ax#
write float 1,ay#
write float 1,az#
endif
next x
cx#=camera position x(0)
cy#=camera position y(0)
cz#=camera position z(0)
cax#=camera angle x(0)
cay#=camera angle y(0)
caz#=camera angle z(0)
write float 1,cx#
write float 1,cy#
write float 1,cz#
write float 1,cax#
write float 1,cay#
write float 1,caz#
wait 1000*7
close file 1
endif
load in a game
if load=1
if file exist(name$+".dat")=1
open to read 1,name$+".dat"
read long 1,coinscolleted
read long 1,health
read long 1,dragonposition
read long 1,positionTaurus
read long 1,coinscolleted
read long 1,points
read long 1,pear
read long 1,orange
read long 1,apple
read long 1,red
read long 1,dragonhealth
read long 1,Taurus1health
read long 1,oz#
for jails=24 to 32
read long 1,jail(jails).state
next jails
read long 1,kitchenend
read long 1,playvideonow
read long 1,kitchenstorage
read long 1,kitchen
read long 1,fanposition
read long 1,cTVal
read long 1,changefruittexture
for x=2 to 2
if object exist (x)
read float 1,x#
read float 1,y#
read float 1,z#
read float 1,ax#
read float 1,ay#
read float 1,az#
position object x,x#,y#,z#
xrotate object x,ax#
yrotate object x,ay#
zrotate object x,az#
endif
next x
cx#=camera position x(0)
cy#=camera position y(0)
cz#=camera position z(0)
cax#=camera angle x(0)
cay#=camera angle y(0)
caz#=camera angle z(0)
read float 1,cx#
read float 1,cy#
read float 1,cz#
read float 1,cax#
read float 1,cay#
read float 1,caz#
position camera 0,cx#,cy#,cz#
xrotate camera 0,cax#
yrotate camera 0,cay#
zrotate camera 0,caz#
close file 1
endif
my signature keeps being erased by a mod So this is my new signature.