Prev Previous Post   Next Post Next
Old 01-06-2010, 06:11 AM
tr00st tr00st is offline
Junior Member
Join Date: Jan 2010
Location: Suffolk, UK
Posts: 4


Not sure exactly what the problem is... Does this give an "Error Occured" error, rather than just not working as expected? If so, you might want to try catching the error using pcall. You might use something like:

function wrappedCode(argument)
  -- Your code here, instead of the error line
  error "This would not be here if you had some code!"
success, message = pcall(wrappedCode, "String as argument")
After running, that would set the variable success to true when the code executed fine, or false if there's an error, as well as setting "message" to any error message that was given.

Hope that helps!
Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 07:12 PM.