pcall
functionimplementedavailable in: camelot
Calls a function, returning a boolean indicating success as the first return value, and error text / return values as the following values. retOK, ret1, ret2, ... = pcall (func, arg1, arg2, ...);
The client has this function, but Blizzard's documentation leaves it out, so its parameters and results aren't known.
Returns
| # | name | type | description |
|---|---|---|---|
| 1 | retOK | boolean | If the call to the function (that was passed to pcall) succeeded, returns true. If an error occured, returns false. |
| 2 | ret1 | string | (if failed) / Variable - If an error occured, error text is returned; if not, ret1 is the first return value of the original function. |
In wowlua's emulated client
implementedwowlua models the system behind it. what the statuses mean
sources
Description: warcraft.wiki.gg's API pages ↗, by its contributors, CC BY-SA 4.0 ↗.