but the input command ask an answer to be a string
so you can do something like that
input "x", obj1x$
obj1x# = int(obj1x$)
that your code
input "x ",obj1x
input "y ",obj1y
input "z ",obj1z
open to write 1,objpos
read file 1,obj1x
read file 1,obj1y
read file 1,obj1z
close file 1
all the problem in your code
input ask for a string answer
you open to write a file but you read it : so open your file to read
I'm not good with file I/O becose I'm learning that now but try that
input "x ",obj1x$
input "y ",obj1y$
input "z ",obj1z$
`this check if the file exist and delete it if exist ( if your `file exist and you open it to write, your program crash)
if file exist("objpos") = 1 then delete file objpos
`open the file to write
open to write 1,objpos
write string 1,obj1x$
write string 1,obj1y$
write string 1,obj1z$
`close the file
close file 1
open to read 1, objpos
read string 1, objx$
read string 1, objy$
read string 1, objz$
close file 1
`Here we see if the file is ok
cls
print objx$
print objy$
print objz$
wait key
i'm not sure the code is all ok but try this
and that my post when i got proble to write to file and now i m ok i think
http://forum.thegamecreators.com/?m=forum_view&t=103230&b=1
If you can, I can!