Garry's Mod Wiki

GM:OnLuaError

  GM:OnLuaError( string error, string realm, table stack, string name, number id )

Description

Called when a Lua error occurs.

On the server realm, this hook will only account for server-side errors, not client-side ones.

Arguments

1 string error
The error that occurred.
2 string realm
Where the Lua error took place, "client", or "server"
3 table stack
The Lua error stack trace
4 string name
Title of the addon that is creating the Lua errors.
5 number id
Steam Workshop ID of the addon creating Lua errors, if it is an addon.