If you show the code you're using, then it would be a lot easier to help
EDIT:
Here's the basic code used for storing of a string in a file, and then opening and reading the contents:
set dir "C:/"
if file exist("password.txt")
open to read 1,"password.txt"
read string 1,password$
close file 1
else
input "Please enter a password:",password$
open to write 1,"password.txt"
write string 1,password$
close file 1
endif
print password$
wait key
Just ask if there's anything you don't understand
EDIT 2:
Here's a basic code that converts a value to a string, writes it to a file. Then open the file again, read the string, and convert back to a value. Just ask.
set dir "C:/"
if file exist("password.txt")
open to read 1,"password.txt"
read string 1,password$
`convert the read string to a value
password=val(password$)
close file 1
else
input "Please enter a password(in digits):",password
open to write 1,"password.txt"
`convert the string to a value, and write it to a file
write string 1,str$(password)
close file 1
endif
print password
wait key