iteration
This commit is contained in:
		@ -6,15 +6,15 @@ if program_name == nil then
 | 
			
		||||
    return
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
http.get("https://gitea.layla.gg/layla/computercraft/raw/branch/main/" .. program_name .. ".lua", nil, function(response)
 | 
			
		||||
    if response.getResponseCode() == 200 then
 | 
			
		||||
response = http.get("https://gitea.layla.gg/layla/computercraft/raw/branch/main/" .. program_name .. ".lua", nil)
 | 
			
		||||
 | 
			
		||||
if response.getResponseCode() == 200 then
 | 
			
		||||
    local file = fs.open(program_name .. ".lua", "w")
 | 
			
		||||
    file.write(response.readAll())
 | 
			
		||||
    file.close()
 | 
			
		||||
    print("Updated " .. program_name .. ".lua")
 | 
			
		||||
    else
 | 
			
		||||
else
 | 
			
		||||
    print("Failed to update " .. program_name .. ".lua")
 | 
			
		||||
    print(response)
 | 
			
		||||
    end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user