Posted 04 February 2014 - 06:06 PM
I have a computer with a disk drive, and when I put a disk in it reads the disk and checks for this weeks password. My problem is that when the file on disk containing the password doesn't exist (empty disk) the program gives me the attempted to index a nill value error. I've been trying to get OR to work, but I don't know how.
local file = fs.open("disk/pass", "r") or file = "noFile"
local data = fs.readAll() or check = "noPass"
otherwise, when the file exists and the password is correct, it works fine.