Garry's Mod Wiki

Revision Difference

GM:OnClientLuaError#564627

<cat>hook</cat> <function name="OnClientLuaError" parent="GM" type="hook"> <description> Called when a Lua error occurs on a client. This hook allows server-side code to detect and respond to client-side errors. It is triggered regardless of the value of sv_log_client_errors, but is still subject to the 5-errors-per-second rate limit, similar to console logging behavior.⤶ This hook allows server-side code to detect and respond to client-side errors. </description> <realm>Server</realm> <added>2025.05.16</added> <args> <arg name="strErr" type="string">The error message produced on the client.</arg> <arg name="ply" type="Player">The player whose client caused the error.</arg> <arg name="error" type="string">The error that occurred.</arg> <arg name="ply" type="Player">The player whose client caused the error.</arg> <arg name="stack" type="table">The Lua error stack trace</arg>⤶ <arg name="name" type="string">Title of the addon that is creating the Lua errors, or "ERROR" if addon is not found.</arg>⤶ </args> <rets /> </function>