This commit is contained in:
2025-06-15 20:36:44 -04:00
parent 3875cb9688
commit cf44882976

View File

@@ -49,13 +49,17 @@ local function createSoundFile(fileName)
local event, url, handle
repeat
event, url, handle = os.pullEvent("http_success")
event, url, handle = os.pullEvent()
if event == "http_failure" and url == fullPath then
print("HTTP request failed for: " .. url)
return nil
end
if event == "http_success" then
print("Waiting for response from: " .. url)
until url == fullPath
end
until event == "http_success" and url == fullPath
print(handle.readAll())
local fileData = handle.readAll()
local file = fs.open(name,"w")
file.write(fileData)