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