summaryrefslogtreecommitdiff
path: root/core/math/expression.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/math/expression.cpp')
-rw-r--r--core/math/expression.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/core/math/expression.cpp b/core/math/expression.cpp
index a161dbddba..ba40cb4586 100644
--- a/core/math/expression.cpp
+++ b/core/math/expression.cpp
@@ -177,7 +177,7 @@ int Expression::get_func_argument_count(BuiltinFunc p_func) {
}
void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant *r_return, Variant::CallError &r_error, String &r_error_str) {
-
+ r_error.error = Variant::CallError::CALL_OK;
switch (p_func) {
case MATH_SIN: {
@@ -622,15 +622,12 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
case TEXT_PRINTERR: {
String str = *p_inputs[0];
-
- //str+="\n";
print_error(str);
} break;
case TEXT_PRINTRAW: {
- String str = *p_inputs[0];
- //str+="\n";
+ String str = *p_inputs[0];
OS::get_singleton()->print("%s", str.utf8().get_data());
} break;
@@ -1916,7 +1913,7 @@ bool Expression::_execute(const Array &p_inputs, Object *p_instance, Expression:
bool valid;
r_ret = base.get_named(index->name, &valid);
if (!valid) {
- r_error_str = vformat(RTR("Invalid named index '%s' for base type "), String(index->name), Variant::get_type_name(base.get_type()));
+ r_error_str = vformat(RTR("Invalid named index '%s' for base type %s"), String(index->name), Variant::get_type_name(base.get_type()));
return true;
}