1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Fixes the misleading error message for call_recursive method for TreeItems

(cherry picked from commit c37f633216)
This commit is contained in:
Umang Kalra
2020-10-17 12:30:29 +05:30
committed by Rémi Verschelde
parent a45bf288e8
commit f40d46bafc

View File

@@ -1120,6 +1120,13 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
OPCODE_BREAK; OPCODE_BREAK;
} }
} }
} else if (methodstr == "call_recursive" && basestr == "TreeItem") {
if (argc >= 1) {
methodstr = String(*argptrs[0]) + " (via TreeItem.call_recursive)";
if (err.error == Variant::CallError::CALL_ERROR_INVALID_ARGUMENT) {
err.argument += 1;
}
}
} }
err_text = _get_call_error(err, "function '" + methodstr + "' in base '" + basestr + "'", (const Variant **)argptrs); err_text = _get_call_error(err, "function '" + methodstr + "' in base '" + basestr + "'", (const Variant **)argptrs);
OPCODE_BREAK; OPCODE_BREAK;