The second issue is still not resolved, I'm afraid. I expanded both pieces of code a little:
If file exist("main.dat") = 0 and file exist("usernames.arr") = 0 and file exist("passwords.arr") = 0
Dim usernames$(1)
Dim passwords$(1)
Make file "main.dat"
usernames$(0) = "test"
Save array "usernames.arr", usernames$()
Save array "passwords.arr", passwords$()
endif
Therefore, it is only triggered when there are no data files at all to prevent the program overwriting the user's data.
The second part now works, but only if you delete the data files then run the program. If you try and run it again, somehow the array is not being recognised as it doesn't print anything:
Load array "usernames.arr", usernames$()
cls
Input "Please enter username: ", eu$
Input "Please enter password: ", ep$
ca = 0
while ca < array count(usernames$())
If eu$ = usernames$(ca)
account$ = usernames$(ca)
Exit
endif
ca = ca + 1
Endwhile
Print account$
Wait key
Thanks, sorry for the volume of questions and persistent issues.
[Insert witty remark here]