Skip to content

KcdMp.on_any_event

A catch-all handler for events without one of their own.

Set it to a function to receive every event no KcdMp.on_event handler claims. nil (the default) ignores them.

KcdMp.on_any_event

function | nil - function(name, payload) end, or nil for no hook

KcdMp.on_any_event = function(name, payload)
System.LogAlways("[KcdMp] unhandled event " .. name .. ": " .. payload)
end

KcdMp.on_event · the Script events group of the index