I have this piece of code in one file:
When the function being called is in the same file, it reads it from
… it ignores
Code:
if cc_value[4] ~= nil then
local function_name = cc_value[4]
function_name(db.actor, nil)
When the function being called is in the same file, it reads it from
local
and does what it's supposed to. However, if the function is in another file (example_file.script) and the following code is used…
Code:
if cc_value[4] ~= nil then
local function_name = cc_value[4]
example_file.function_name(db.actor, nil)
… it ignores
local
and tries to find a function called function_name
in example_file.script, which is what should happen if the local wasn't there. How would one get it to recognize the local despite this?