mirror of
https://github.com/godotengine/godot.git
synced 2025-10-22 17:33:33 +00:00
Merge pull request #16173 from vnen/gdscript-arguments
Add argument count check for some GDScript functions
This commit is contained in:
commit
aeed774fef
2 changed files with 12 additions and 2 deletions
|
@ -1516,11 +1516,11 @@ GDScriptParser::Node *GDScriptParser::_reduce_expression(Node *p_node, bool p_to
|
|||
String errwhere;
|
||||
if (op->arguments[0]->type == Node::TYPE_TYPE) {
|
||||
TypeNode *tn = static_cast<TypeNode *>(op->arguments[0]);
|
||||
errwhere = "'" + Variant::get_type_name(tn->vtype) + "'' constructor";
|
||||
errwhere = "'" + Variant::get_type_name(tn->vtype) + "' constructor";
|
||||
|
||||
} else {
|
||||
GDScriptFunctions::Function func = static_cast<BuiltInFunctionNode *>(op->arguments[0])->function;
|
||||
errwhere = String("'") + GDScriptFunctions::get_func_name(func) + "'' intrinsic function";
|
||||
errwhere = String("'") + GDScriptFunctions::get_func_name(func) + "' intrinsic function";
|
||||
}
|
||||
|
||||
switch (ce.error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue