Posted 02 July 2014 - 03:58 PM
hey guys,
can someone help me out? when I run my program it doesn't save the GitHub file content.
can someone help me out? when I run my program it doesn't save the GitHub file content.
function git(file, path)
local remote = http.get("http://raw.github.com/connordelaneyy/CDEL-RPG/master/"..file)
local code = remote.readAll()
remote.close()
file = fs.open(path, "w")
file.write(code)
file.close()
end
print("What would you like to install?")
print("[1] Server")
print("[2] Client")
input = read()
if input == "1" then
git("server.lua", "server")
print("Downloaded Server")
elseif input == "2" then
git("client.lua", "client")
print("Downloaded Client")
else
error("Invalid Selection", 0)
end