while/wend or eof error in Linux
Jan 14, 2009 23:10:51 GMT -5
Post by Psycho on Jan 14, 2009 23:10:51 GMT -5
I'm not sure which function is causing the error but I narrowed down an example piece of code that works fine in Windows but yields the following error in Linux:
To test, I created a file in the public folder titled "users.txt" and put the following garbage entries into it:
2
My Name
pass1
1
Another Name
pass2
1
Where it should read the first line as the number of items for the dim statements, then input the actual values from the next 6 lines.
Following is the code excerpt that produces the error:
Using Ubuntu 8.04
John "Psycho" Siejkowski
EDIT: As a side note, anyone using Linux should be able to figure it out but, the readme.txt file for starting RB in Linux still says "-cd to the rb101b3 folder" from the last beta.
Runtime Error in program 'untitled': #users, username$(m)
Index out of bounds: 3
To test, I created a file in the public folder titled "users.txt" and put the following garbage entries into it:
2
My Name
pass1
1
Another Name
pass2
1
Where it should read the first line as the number of items for the dim statements, then input the actual values from the next 6 lines.
Following is the code excerpt that produces the error:
open "public/users.txt" for input as #users
line input #users, numberofusers
'Set the variables to match the number of users
dim username$(numberofusers)
dim password$(numberofusers)
dim adminflag(numberofusers)
m=1
while eof(#users) = 0
line input #users, username$(m)
line input #users, password$(m)
line input #users, adminflag(m)
m=m+1
wend
close #users
Using Ubuntu 8.04
John "Psycho" Siejkowski
EDIT: As a side note, anyone using Linux should be able to figure it out but, the readme.txt file for starting RB in Linux still says "-cd to the rb101b3 folder" from the last beta.