OnScriptError

From Onset Developer Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
OnScriptError

Type: Event
Context: Client & Server
Introduced: v1.0

Description

Called when a script error occurs. On the client side, this is only called when the game was started with the -dev switch. Available on the sever side since version 1.0.3.

Syntax

OnScriptError(message)

Parameters

  • message
    The script error message.

Example

function OnScriptError(message)
	print(message)
end
AddEvent("OnScriptError", OnScriptError)

Client-side Example

function OnScriptError(message)
	AddPlayerChat('<span color="#ff0000bb" style="bold" size="10">'..message..'</>')
end
AddEvent("OnScriptError", OnScriptError)

See also