Garry's Mod Wiki

GM:OnClientLuaError

  GM:OnClientLuaError( string strErr, Player ply )

Recently Added

This was recently added in version (2025.05.16). It might only be available on the Dev Branch right now.

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.

Arguments

1 string strErr
The error message produced on the client.
2 Player ply
The player whose client caused the error.

Returns