Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: Bill_O on May 12, 2020, 01:53:52 PM
-
I am looking through some scripts that others have written to see what I can steal or modify.
I came across a script that uses pInst and pcall.
What is the p for?
I understand and have used Inst and call but do not know what they do if p is added.
Hope this is clear enough.
Bill
-
I'm not sure about pinst. I think that is just a variable name. But pcall is a LUA "Protected Call", hence the "p" in pcall. It gives a means to trap and handle errors without bombing out the whole LUA chink that is running. In other words, it is usually used to handle errors gracefully.
Steve
-
Steve,
Thanks for the information.
Bill