Hi,
I don't consider myself a newbie at programming and have searched the forum (before anyone asks)
See Code attached.
I have a list of names with points against them which when I display they appear correct, but when I save to a file, they don't appear in the correct order. I have spent hours trying to figure out why and can't see any errors....
It seems so simple, the variables are identicle and are displayed in the same order as the strings are written...
Any help would be really great...
Here shows how data is displayed...
c=20
Set Text Transparent
set text font "Ariel"
set text to BOLD
set text size 15
Set Text Opaque
for i = 0 to No_of_Drivers-1
text 655,c,"" +(chdriver$(i))+ " "
text 778,c,"" + (chteam$(i))
text 873,c,"" + STR$(chpoints(i))+" Pts"
c=c+21
sync
next i
Here shows code called for saving and loading....
Save_Championship:
Filename$="Gamedata\season.dat"
If File Exist(Filename$) then delete file (Filename$)
Open To Write 1,Filename$
For N=0 To 19
Write String 1,chdriver$(N)
Write String 1,chteam$(N)
Write String 1,Str$(chpoints(N))
Next N
Close File 1
Return
Load_Championship:
Filename$="Gamedata\season.dat"
If File Exist(Filename$)
Open To Read 1,Filename$
For N=0 To 19
Read String 1,T$: chdriver$(N)=T$
Read String 1,T$: chteam$(N)=T$
Read String 1,T$: chpoints(N)=Val(T$)
Next N
Close File 1
Endif
Return