updated
This commit is contained in:
@@ -49,13 +49,17 @@ local function createSoundFile(fileName)
|
|||||||
|
|
||||||
local event, url, handle
|
local event, url, handle
|
||||||
repeat
|
repeat
|
||||||
event, url, handle = os.pullEvent("http_success")
|
event, url, handle = os.pullEvent()
|
||||||
print("Waiting for response from: " .. url)
|
if event == "http_failure" and url == fullPath then
|
||||||
until url == fullPath
|
print("HTTP request failed for: " .. url)
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
if event == "http_success" then
|
||||||
|
print("Waiting for response from: " .. url)
|
||||||
|
end
|
||||||
|
until event == "http_success" and url == fullPath
|
||||||
|
|
||||||
print(handle.readAll())
|
|
||||||
local fileData = handle.readAll()
|
local fileData = handle.readAll()
|
||||||
|
|
||||||
local file = fs.open(name,"w")
|
local file = fs.open(name,"w")
|
||||||
|
|
||||||
file.write(fileData)
|
file.write(fileData)
|
||||||
|
|||||||
Reference in New Issue
Block a user