Quote: "Thanks, the code seems logical and compiles and runs, but it never writes anything to the file, and I just changed the file to test.txt. So I am kinda wondering why nothing is being put into the file? Programmer error?"
Indeed it is... He forgets to close the file
Remember to always close the file after having used open to read/write. And I don't know what db you use... But in DBPRO there is no command named "read integer" or "write integer". Should be something like "read long" and "write long".
It should look like this:
Write:
accnt$="ben"`account
level=10
open to write 1,"data.dat"
write string 1,accnt$
write long 1,level
close file 1
print "done!"
wait key
Read:
open to read 1,"data.dat"
`you must read them in the same order you wrote them
read string 1,accnt$
read long 1,level
close file 1
print "done!"
print accnt$
print level
wait key
Those two sources works here. If you can't compile it then I guess it's because you own dbc... Then just change "read long" and "write long" to "read integer" and "write integer".
[edit]
Okay the command "write integer" doesn't work in DBC either...
Also, you could try using the command "write byte" instead...
[/edit]
-The Nerd