Here let me give you the code I got for both .dba files. They are both saved to the same project folder also.
charhp#=100
charmp#=50
charstr#=125
charname$="SmokieMcPot"
rem Delete file
if file exist("test.dat") then delete file "test.dat"
open to write 1,"test.dat"
write byte 1,charhp# : print charhp#
write word 1,charmp# : print charmp#
write long 1,charstr# : print charstr#
write string 1,charname$ : print charname$
suspend for key
close file 1
cls
suspend for key
open to read 1,"test.dat"
read byte 1,charhp# : print charhp#
read word 1,charmp# : print charmp#
read long 1,charstr# : print charstr#
read string 1,charname$ : print charname$
open to read 1,"test.dat"
read byte 1,charhp# : print charhp#
read word 1,charmp# : print charmp#
read long 1,charstr# : print charstr#
read string 1,charname$ : print charname$
suspend for key
Maybe that will help you out. Instead of printing the correct integer numbers it replaces them with zero. It does print out the correct string though. Tell me what I did wrong.
Once again you are on the ball.
Thanks
Nicolas
*Current Project: Untitled RPG
*Working With: Vash the Stampede 815
*Future Number: Eleventy