I am getting an error that says the the parameter for Str$ does not match the "value" at line 22.
Rem Check if file exists
If File Exist(filename$)
Open to Read 1, Filename$
For N=1 to 10
Read String 1, T$: Playername$(N)=T$
Read String 1, T$: Hiscore(N)=Val(T$)
Next N
Close file 1
REm If file doesn't exist, Write it
Else
Open To Write 1, Fildname$
For N=1 to 10
Write String 1,Str$(Hiscore(N))
Write String 1,Str$(Playername$(N))
Next N
Close File 1
Endif
This is the last WriteString 1 statement.
I am getting this out of the Tutorials For DB Pro.
I think they should be reversed and placed in the same order as in the Read Statement, but I get an error that way also.
(I am using the DB Pro demo program until mine arrives.)
The following if the complete code that I have to this point. Maybe the problem is in the top somewhere..)
Rem High Score Table
Dim Hiscore(10)
Dim PlayeName$(10)
Filename$="HISCORE.DAT"
Rem Check if file exists
If File Exist(filename$)
Open to Read 1, Filename$
For N=1 to 10
Read String 1, T$: Playername$(N)=T$
Read String 1, T$: Hiscore(N)=Val(T$)
Next N
Close file 1
REm If file doesn't exist, Write it
Else
Open To Write 1, Filename$
For N=1 to 10
Write String 1,Str$(Hiscore(N))
Write String 1, Playername$(N)
Next N
Close File 1
Endif
I notice they change the titles around in order between read and write but, that doesn't change the error message.