Code:
function install()
advWrite("Trying to get file",colors.black,colors.white,(termX-18)/2,subTitleH+3)
advWrite("1/3",colors.blue,colors.white,(termX-22)/2,subTitleH+3)
for i = 1,3 do
if mode == "client" then local onlineFile = http.get(gitUrl.."lordLoginC").readAll() end
if mode == "auth" then local onlineFile = http.get(gitUrl.."lordLoginA").readAll() end
if mode == "server" then local onlineFile = http.get(gitUrl.."lordLoginS").readAll() end
if onlineFile ~= nil then break end
end
term.setCursorPos(1,subTitleH+3)
term.setBackgroundColor(colors.white)
term.clearLine()
advWrite("Success",colors.green,colors.white,(termX-7)/2,subTitleH+3)
advWrite("Writing into local file",colors.gray,colors.white,(termX-23)/2,subTitleH+4)
sleep(1)
localFile = fs.open("lordLogin", "w")
print(onlineFile)
localFile.write(onlineFile)
localFile.close()
sleep(1)
end
It says "Trying to get file" and even "Success, Writing into local file", but then it gives a "Java exception thrown". Note, I'm using CCEmu Redux, and I couldn't test the program in Minecraft. Could it be that?