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

Is it possible for the success in getasync to ever return true despite erroring?

Asked by 3 years ago

So I rely heavily on Pcall function

Success, ReturnedMessage

Its going to screw me up if GetAsync Success pcall returns true despite there being a datastore outage or problem

is there any chance of it returning true

cause I know Success returns false when there's like something wrong with it but I was wondering

If there is any chance for it to return true despite having issues

and what can I do to prevent that

Heres my code basically


local Success, ReturnedValue = pcall(function() local MyData = InventoryDataStore:GetAsync(Player.UserId) return MyData end) if Success then if ReturnedValue ~= nil then --Player has their data -- Data is succesful load the data onto the game else -- Player has no data The player might be new Load the basic data end else Player:Kick() end

Answer this question