Skip to main content

Overview

This error occurs when your Lua code attempts to call a variable as a function, but that variable is nil at runtime or the <function> no longer exists.

Common Causes

If the function is a built-in IguanaX Translator API function, check if the function still exists in Deprecated APIs in your current version of IguanaX.

Otherwise, review common causes below:

Scenario

Example

Explanation

Function is undefined

myFunc()

myFunc was never declared or was called before it was defined

Function was overwritten

myFunc = nil

myFunc()

The function was assigned nil or

The table field doesn't exist

t.someFunc()

someFunc was never added to table t

Failed or incorrect require

local mod = require("missing")mod.doStuff()

The module or library returned nil (not loaded properly)

Typo in function name

log.prnt("hi")

You meant log.print — wrong field name

Incorrect use of . instead of :

obj.greet() instead of obj:greet()

The method is expecting self but didn't receive it

Global function overwritten

print = nilprint("hi")

Overwriting built-in functions by mistake