So I have a script
local S,E = pcall(function() return DataStore:GetAsync(Player.UserId) end) if S then if E then end end -- Which situations would cause E to return nil even if the pcall's first parameter was true
I know one way which is when GetAsync() returns nothing
But I was wondering if there was any other way E would return nil even if first parameter returned true
The first return value is whether it ran without error. If there was is no error, it will be true otherwise it will be false.
The second return value is going to be nil if it ran without error (first is true) or be an error message depending on if one was given (as far as I know all errors with the language itself provide an error message, but calling error
with no provided message of course won't give one).