repeat
success, playerData = pcall(function()
return DataBase:GetAsync(PlayerUserId)
end)
Attempt += 1
if not success then
warn(playerData)
task.wait(3)
end
until success or Attempt == 5
is it equal to
if succes then
playerData = pcall(function()
return DataBase:GetAsync(PlayerUserId)
end)
end
?
Does this syntax have a name? Is it even a lua or some roblox thing?
No, those code-blocks are not equivalent to each other. A pcall(protected call) function returns a boolean, “success” and the data received back from the pcall() function is the player’s data, “playerData”. “success” and “playerData” are both variables, being set by the returned values.
pcall() is part of lua.
These 2 pages might help you better understand what they are: