I am trying to write into a file and then read its contents the code I am using is:
file.remove("CRED.lua")
file.open("CRED.lua","w+")
temp = "PASS = "..pass
file.writeline(temp)
temp = "SSID = "..ssid
file.writeline(temp)
file.flush()
temp = nil
file.close()
It seems that the file is created but I when I do this:
dofile("CRED.lua")
print(PASS)
print(SSID)
I am getting both nil value.
Do you know why?