[Overview][Types][Classes][Procedures and functions][Variables] | Reference for unit 'LuaObject' (#pLua)

# TLuaObject.CallEvent

Used to call a Lua Event Handler.

## Declaration

Source position: line 0

`public procedure TLuaObject.CallEvent(`
`EventName: AnsiString`
`); overload; function TLuaObject.CallEvent(`
`EventName: AnsiString;`
`args: array of Variant;`
`Results: PVariantArray = nil`
`):Integer; overload;`

## Arguments

`EventName` |  | Name of the event to be called.

## Arguments

`EventName` |  | Name of the event to be called.
`args` |  | Arguements to be passed into the event method.
`Results` |  | Pointer to a variant array to place the result values in.

## Function result

Number of items placed on the Lua Stack (returned) by the event script source.