Calls function f with the supplied arguments in protected mode. Catches errors and returns:
On success:
On failure:
function f (v)
return v + 2
end -- f
a, b = pcall (f, 1)
print (a, b) --> true 3
a, b = pcall (f, "a")
print (a, b) --> false stdin:2: attempt to perform arithmetic on local `v' (a string value)