mad1231999

Untitled

Jan 27th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.23 KB | None | 0 0
  1. local function foo(a, b)
  2.     return tostring(a) + b
  3. end
  4.  
  5. local status, err = pcall(foo, 4, {"test", 123})
  6.  
  7. if not status then
  8.     print("Error while running program: " .. tostring(err))
  9. else
  10.     print("foo() returned value " .. err)
  11. end
Advertisement
Add Comment
Please, Sign In to add comment