M MY Multiplayer: Wiki
Side
Kind

wasEventCancelled

Shared

Tells whether the last event that finished running on this side was cancelled.

bool wasEventCancelled()

Returns

true if the last finished event was cancelled, else false.

Example

addEvent("onShopOpen")

triggerEvent("onShopOpen", resourceRoot)
if wasEventCancelled() then
    outputDebugString("shop closed: " .. getCancelReason())
end
NoteInside a handler, the answer is about the last event that already finished, not the one running.

See also