of     1   

Scribble_Knight
#218179067Sunday, June 04, 2017 11:04 PM GMT

What's the difference? There's nothing on the wiki about it, except for pcall.
JarodOfOrbiter
#218179532Sunday, June 04, 2017 11:10 PM GMT

Yielding means to pause for whatever reason and allow other sections of code to run, wait for something, and so forth. Good examples are wait() and WaitForChild. Anyhow, in standard Lua, you can't yield inside pcall. I know that for a fact. The rest of this may be inaccurate, but it's what I can remember. Roblox added ypcall (yield pcall) to allow it, but later they just made pcall support it because there's no reason to have two different functions that do the same thing. At least, that's what I remember. I'll double-check in a second.
Cuyler
#218180336Sunday, June 04, 2017 11:22 PM GMT

Jarod is correct. Initially, you couldn't yield in a pcall (in vanilla Lua 5.1.4). ROBLOX added ypcall to add this functionality. Sometime later, pcall was changed to include the functionality of ypcall. I believe ypcall now only exists for compatibility.
JarodOfOrbiter
#218180517Sunday, June 04, 2017 11:25 PM GMT

I just checked in Studio, they aren't the exact same function, but they do have the same functionality. Now who can explain xpcall to me? I don't even remember.
JarodOfOrbiter
#218180580Sunday, June 04, 2017 11:26 PM GMT

Oh, never mind. Custom error handler.
cntkillme
#218182232Sunday, June 04, 2017 11:51 PM GMT

They're the same function, just 2 different closures. Just like how pairs() ~= next but pairs returns next, it's just another closure.

    of     1