Hi, I have this snippet of code to run functions based on a fn_name stored in a string.
var fn = funcref(functions, fn_name)
if fn == null: # this is never triggered
print("COULD NOT FIND FUNCTION ")
return
fn.call_func() # execute the function
If function doesn't exist godot throws:
Invalid call. Nonexistent function 'call_func' in base 'FuncRef'.
Is there a way to test funcref refers to an existing function before the call to call_func?