Merge pull request #15089 from poke1024/funcref-warn
Warn about funcref creation
This commit is contained in:
commit
3db1c6a6f5
|
@ -605,7 +605,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
|
|||
#ifdef DEBUG_ENABLED
|
||||
if (!valid) {
|
||||
if (src->has_method(*index)) {
|
||||
err_text = "Invalid get index '" + index->operator String() + "' (on base: '" + _get_var_type(src) + "'). Did you mean '." + index->operator String() + "()' ?";
|
||||
err_text = "Invalid get index '" + index->operator String() + "' (on base: '" + _get_var_type(src) + "'). Did you mean '." + index->operator String() + "()' or funcref(obj, \"" + index->operator String() + "\") ?";
|
||||
} else {
|
||||
err_text = "Invalid get index '" + index->operator String() + "' (on base: '" + _get_var_type(src) + "').";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue