Skip to content

Instantly share code, notes, and snippets.

@mk-fg
Created March 24, 2018 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mk-fg/c32c29e9bcf0bf2e82812fab36cdf8f8 to your computer and use it in GitHub Desktop.
Save mk-fg/c32c29e9bcf0bf2e82812fab36cdf8f8 to your computer and use it in GitHub Desktop.
function run_my_mod()
...
end
function OnMsg.LoadGame()
xpcall(run_my_mod, function(err)
WaitCustomPopupNotification(
'ERROR when running mod',
string.format('----- Details:\n%s\n%s\n----- :end\n', err, debug.traceback()),
{'Oops!'})
return false
end)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment