Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is This PostAsync() correct?

Asked by 10 years ago
function ReturnSync() --This works fine but the Sync() does not.
game:GetService('HttpService'):GetAsync("https://code.stypi.com/raw/ma/DatabasePhp/ChatData", true)
end

function Sync()
wait(5)
print('Data Saving')
if (Sky['HttpAble'])==true then
local function PostSync()
local Http=game:GetService('HttpService')
local Link=(Sky['ChatLog'])
local MyJSON=Http:JSONDecode(Link)
Http:PostAsync("https://code.stypi.com/ma/DatabasePhp/ChatData", MyJSON) 
wait() return ReturnSync()
end
else error('Http Not Permited') print('Chat Error')
end
end

coroutine.wrap(function()
Sync()
end)

Answer this question