Skip to content

OnPlayerWebError

A page of a player’s web interface raised a script error.

Only when the server asks for them with [client] ui_report_errors = true (see the server configuration); without it an error stays in the player’s own log. At most five errors a minute per player reach the mode, and each one is also a line in the server log. message is cut to 1024 characters and source to 256 and both are cleaned of control characters; source is the page’s file as its own frame knows it (panel/panel.js), line the line in it, 0 when the page did not say.

The text is what a player’s game sent: show it to an admin, never to other players, and never act on it.

function OnPlayerWebError(pid, frame, message, source, line)
-- ...
end
Parameter Type
pid number the player
frame string the frame’s name
message string what went wrong, as the page’s script reports it
source string the file the error came from, "" when unknown
line number the line in it, 0 when unknown

nothing

function OnPlayerWebError(pid, frame, message, source, line)
Log(string.format("page error in %s (%s:%d) for %s: %s", frame, source, line, GetPlayerName(pid), message))
end

OnPlayerWebReady · OnPlayerWebStatus · the Web interface group of the index