Here is an example of how I load and save character data. I've cut and pasted this from my code and it needs more code to actually do anything but it may help you.
` Setup Character Type
type Character
name AS STRING
sex AS INTEGER
guild AS INTEGER
class AS INTEGER
race AS INTEGER
might AS INTEGER
endurance AS INTEGER
speed AS INTEGER
agility AS INTEGER
Intelligence AS INTEGER
psyche AS INTEGER
charisma AS INTEGER
hitPointsMax AS INTEGER
hitPoints AS INTEGER
powerMax AS INTEGER
power AS INTEGER
poison AS INTEGER
disease AS INTEGER
health AS INTEGER
energy AS INTEGER
reaction AS INTEGER
presence AS INTEGER
endtype
#CONSTANT maxCharacters 6
GLOBAL DIM characters(maxCharacters) AS Character
function SaveCharacters()
LOCAL lp AS INTEGER
if FILE EXIST(characterFilePath) then DELETE FILE characterFilePath
OPEN TO WRITE 1,characterFilePath
for lp=1 TO maxCharacters
WRITE STRING 1,characters(lp).name
WRITE LONG 1,characters(lp).sex
WRITE LONG 1,characters(lp).guild
WRITE LONG 1,characters(lp).class
WRITE LONG 1,characters(lp).race
WRITE LONG 1,characters(lp).might
WRITE LONG 1,characters(lp).endurance
WRITE LONG 1,characters(lp).speed
WRITE LONG 1,characters(lp).agility
WRITE LONG 1,characters(lp).Intelligence
WRITE LONG 1,characters(lp).psyche
WRITE LONG 1,characters(lp).charisma
WRITE LONG 1,characters(lp).hitPointsMax
WRITE LONG 1,characters(lp).hitPoints
WRITE LONG 1,characters(lp).powerMax
WRITE LONG 1,characters(lp).power
WRITE LONG 1,characters(lp).poison
WRITE LONG 1,characters(lp).disease
WRITE LONG 1,characters(lp).health
WRITE LONG 1,characters(lp).energy
WRITE LONG 1,characters(lp).reaction
WRITE LONG 1,characters(lp).presence
next lp
CLOSE FILE 1
endfunction
function LoadCharacters()
LOCAL lp AS INTEGER
if FILE EXIST(characterFilePath)
OPEN TO READ 1,characterFilePath
for lp=1 TO maxCharacters
READ STRING 1,characters(lp).name
READ LONG 1,characters(lp).sex
READ LONG 1,characters(lp).guild
READ LONG 1,characters(lp).class
READ LONG 1,characters(lp).race
READ LONG 1,characters(lp).might
READ LONG 1,characters(lp).endurance
READ LONG 1,characters(lp).speed
READ LONG 1,characters(lp).agility
READ LONG 1,characters(lp).Intelligence
READ LONG 1,characters(lp).psyche
READ LONG 1,characters(lp).charisma
READ LONG 1,characters(lp).hitPointsMax
READ LONG 1,characters(lp).hitPoints
READ LONG 1,characters(lp).powerMax
READ LONG 1,characters(lp).power
READ LONG 1,characters(lp).poison
READ LONG 1,characters(lp).disease
READ LONG 1,characters(lp).health
READ LONG 1,characters(lp).energy
READ LONG 1,characters(lp).reaction
READ LONG 1,characters(lp).presence
next lp
CLOSE FILE 1
endif
endfunction
Jas
----
"What is this talk of 'release'? Klingons do not'release' software. It escapes leaving a bloody trail of developers and quality assurance people in its wake!"