i want to pcall DataStore:GetAsync() so that players dont lose data. Whichever way i do i t, i seem to get an error. What am i doing wrong here?
local success, savedList = pcall(get, plr.userId.."Import")
while not success do wait(1)
print(savedList)
success, savedList = pcall(get, plr.userId.."Import")
end
also, that wait increment up there for one second may be too short or may not be, and possibly expend the budget for writing to the datastore ^^^, if anyone has anything to say about that, im all ears
EDIT: Sorry for the lack in information xd. get is declared as
They aren’t that much of a nightmare. If you directly wrap a function (which is how pcall should be used), then yes you need to be mindful of the syntax and the arguments that need to be passed. Otherwise, you can wrap an anonymous function and call it normally.
local success, savedList = pcall(function ()
return get(args)
end)