Posted 29 May 2012 - 11:58 PM
I'm doing something wrong, and I don't know what it is, can someone have a look and point my booboo out…
This programs goal is to write multiple files to a floppy so as to record name, clearance, etc so that when the punch in to the system, it can be logged.
I'm not sure if it has something to do with line 61
This programs goal is to write multiple files to a floppy so as to record name, clearance, etc so that when the punch in to the system, it can be logged.
I'm not sure if it has something to do with line 61
print ("Corsair Security Card Programming Suite")
HorzLoadBar(5, 45, "/")
print ("Insert blank card")
while true do
os.pullEvent()
if disk.isPresent(dside) then
print ("Card detected")
write ("Enter clearance level of card: >")
local clearance = read()
write ("Enter purpose of card: >")
local purpose = read()
write ("Enter ID# of card: >")
local id = read()
write ("Enter name of user: >")
local name = read()
disk.setLabel(dside, "Level "..clearance.." Access card")
file = io.open("disk/data/clearance", "w")
file:write(clearance) -------------------------------------------->LINE 61
file:close()
file = io.open("disk/data/purpose", "w")
file:write(purpose)
file:close()
file = io.open("disk/data/name", "w")
file:write(name)
file:close()
print ("Card has successfuly been programmed.")
sleep(2)
print ("Please remove the card")
sleep(2)
print ("Rebooting...")
sleep(1)
os.reboot()
end
end