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

# plua_functionexists

## Declaration

Source position: plua.pas line 26

`function plua_functionexists(`
`L: Plua_State;`
`FunctionName: AnsiString;`
`TableIndex: Integer = LUA_GLOBALSINDEX`
`):Boolean;`

## Arguments

`L` |  | PLua_State to work with.
`FunctionName` |  | Name of the function to look for.
`TableIndex` |  | Table index to look for the function in, if none is specified then LUA_GLOABLSINDEX is used. Thus, checking for global functions.

## Function result

Returns TRUE if the function does exist, and FALSE if it does not.

## Description

plua_functionexists checks to see if a function exists within the Lua State for the given name. Returns TRUE if the function does exist, and FALSE if it does not. A FALSE result does not mean that their isn't a variable of the given name, just that the variable isn't a function.

## See also

plua_callfunction |  |