It just calls a link which returns a table and then I save the table. Here’s my network callback (Btw I am using post in the request):
local function networkCallback(event)
if ( event.isError ) or event.response == "The request timed out." or event.status == 404 or event.status == 502 then
clearGroup(loadingScreenGroup)
print( "Network Error!")
displayServerError(group)
else
clearGroup(loadingScreenGroup)
local data = json.decode(event.response)
if table == "allTime" then
allTime = data
elseif table == "week" then
week = data
elseif table == "day" then
day = data
end
table = data
end
end
There are some variables that aren’t created here but are mentioned like allTime, week, and day. Those are all variables that are just created above and table is a paramater of a different function that this callback is inside. Is this similar to your code? [import]uid: 14461 topic_id: 36061 reply_id: 143352[/import]