You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
@@ -983,12 +983,14 @@ void GDScriptAnalyzer::resolve_for(GDScriptParser::ForNode *p_for) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
GDScriptParser::DataType arg_type = call->arguments[i]->get_datatype();
|
GDScriptParser::DataType arg_type = call->arguments[i]->get_datatype();
|
||||||
if (arg_type.kind != GDScriptParser::DataType::BUILTIN) {
|
if (!arg_type.is_variant()) {
|
||||||
all_is_constant = false;
|
if (arg_type.kind != GDScriptParser::DataType::BUILTIN) {
|
||||||
push_error(vformat(R"*(Invalid argument for "range()" call. Argument %d should be int or float but "%s" was given.)*", i + 1, arg_type.to_string()), call->arguments[i]);
|
all_is_constant = false;
|
||||||
} else if (arg_type.builtin_type != Variant::INT && arg_type.builtin_type != Variant::FLOAT) {
|
push_error(vformat(R"*(Invalid argument for "range()" call. Argument %d should be int or float but "%s" was given.)*", i + 1, arg_type.to_string()), call->arguments[i]);
|
||||||
all_is_constant = false;
|
} else if (arg_type.builtin_type != Variant::INT && arg_type.builtin_type != Variant::FLOAT) {
|
||||||
push_error(vformat(R"*(Invalid argument for "range()" call. Argument %d should be int or float but "%s" was given.)*", i + 1, arg_type.to_string()), call->arguments[i]);
|
all_is_constant = false;
|
||||||
|
push_error(vformat(R"*(Invalid argument for "range()" call. Argument %d should be int or float but "%s" was given.)*", i + 1, arg_type.to_string()), call->arguments[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user