Your example a/b/c code will work fine, because the "b" function is defined before you try to call it in the "c" function. Your real code will not work fine, because your "RemGank_Validate_DB" function is not defined before you try to call it in your "RemGank_Record_Player" function.

You have two options:

1. Define the functions in the proper order so that each one is defined before you try to call it:

Code:

local function A() print("A") end -- create this first
local function B() return A() end -- before you call it here

2. Define all of the locals first, and then set their values in whatever order:

Code:

local A, B
function B() return A() end
function A() print("A") end

However, if you only call "RemGank_Validate_DB" from "RemGank_Record_Player" you should just get rid of the whole "RemGank_Validate_DB" function, and just put its code directly in the "RemGank_Record_Player" function.

Better yet, you should just validate your DB once when your addon loads, instead of every time you add a record.