Can someone explain this to me?

Litterally, HOW AND WHY i am going to freak upCapture

You forgot an end):

local success, errormessage = pcall(function() -- As you can see, there are 2 ( brackers and only 1 ) bracket
    banDataStore:SetAsync(pid, true)
end) -- This one covers the other ) bracket, and closes the statement with "end"
if success then
1 Like

set async does not require an end and does not answer the question of why is the code saying that success does not exist, and there is an end

The end is for the pcall. Not the SetAsync.

1 Like

there is an end if you look closer

Incorrect, you shouldn’t assume. You will need the end, or the code will mess up and therefore not work, hence why your success variable doesn’t work.

Next time, please try the solution before replying 3 seconds after.

The thing is, you’re missing an end, please try my solution before assuming:

May you please try the solution, you’re asking for help, and you are assuming people are wrong before at least trying it or even reading it for a second more, you replied in an instant.

1 Like


The end that you added is for the if statement, not the pcall.

i know , but look there is an end for both

Then you have to put the end before the if statement, or the script will try to check for success inside the pcall.

what solution? there is already both ends

Not to be rude, but, can you stop being stubborn and at least try it?

local success, errormessage = pcall(function()
    banDataStore:SetAsync(pid, true)
end) -- The end you are saying you shouldn't have, but should
if success then


You asked for help, you get help, and then you are not grateful for it because you think it’s wrong, and you’re not even trying it.

1 Like

before telling me to try something, finish , as telling me its missing an end and not putting it is a but confusig uh?

You have to close the function which is pcalled first before you can evaluate “success”. It is underlined as yellow for that reason.

1 Like

True! thank you very much m8 !

Just try it, please. People are losing patience here, you blatantly shot down the answer that WORKS and now we’re just arguing. Try the first one and you’ll see, maybe you’ll learn.

You can wrap SetAsync in a pcall directly and avoid this whole issue:
local success, errormessage = pcall(banDataStore.SetAsync, banDataStore, pid, true)

1 Like