Commit Graph

15 Commits

Author SHA1 Message Date
sorcerykid 15ba75e4cf Add on_authplayer callback and 'last_login' to on_joinplayer (#9574)
Replace on_auth_fail callback with more versatile on_authplayer
    Better clarify account login process in Lua API documentation
    Change initial timestamp for newly registered accounts to -1
2020-05-23 13:25:29 +02:00
ANAND d1c27c7e80 Allow customizing chat message format (#8529) 2019-08-08 17:04:46 +01:00
Loïc Blot eef62c82a2
Modernize lua read (part 2 & 3): C++ templating assurance (#7410)
* Modernize lua read (part 2 & 3): C++ templating assurance

Implement the boolean reader
Implement the string reader
Also remove unused & unimplemented script_error_handler
Add a reader with default value
2018-06-30 17:11:38 +02:00
Loïc Blot ccc3af128c
CSM/SSM: Add on_mods_loaded callback (#7411)
* CSM/SSM: Add on_mods_loaded callback
2018-06-06 12:53:59 +02:00
Kahrl 3304e1e517 Push error handler afresh each time lua_pcall is used
Fixes "double fault" / "error in error handling" messages
(issue #1423) and instead shows a complete backtrace.
2015-08-27 01:56:06 +02:00
kwolekr 2b04ab874d SAPI: Track last executed mod and include in error messages 2015-08-12 23:56:12 -04:00
kwolekr bcf47bc67c Improve Script CPP API diagnostics 2015-08-05 21:13:03 -04:00
ShadowNinja c4359ff65c Use "core" namespace internally 2014-05-08 13:02:04 -04:00
ShadowNinja db4ea4658c Only push the Lua error handler once 2014-04-27 16:15:53 -04:00
ShadowNinja 31fe72dbac Remove lua_State parameter from LuaError::LuaError 2014-03-15 16:28:59 -04:00
ShadowNinja f8b7555558 Revert "Make sure we get a stacktrace for as many lua errors as possible"
This reverts commit 362ef5f6ce.

Stack tracebacks couldn't be generated in LuaError::LuaError anyway and this
caused a second, empty traceback in most cases.  In cases where there wasn't
annother traceback the stack had already unwound and the traceback was empty.
2014-03-15 16:01:06 -04:00
Sfan5 362ef5f6ce Make sure we get a stacktrace for as many lua errors as possible 2014-03-15 14:51:00 +01:00
ShadowNinja 49cec3f782 Handle LuaErrors in Lua -> C++ calls on LuaJIT 2013-12-18 16:35:55 -05:00
ShadowNinja 371b39a09a Pass a errfunc to lua_pcall to get a traceback 2013-11-15 14:13:31 -05:00
Kahrl 4e1f50035e Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00