summaryrefslogtreecommitdiff
path: root/modules/gdscript
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-05-17 13:11:55 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-05-17 13:15:23 -0300
commite72717e3738ea7fe1a2a6c9447ad0090bdf297ec (patch)
treeb56830ff525387c5e5ddc0868878c05b46ab129b /modules/gdscript
parent0faaa729e760c1e71d037d0c31267c209727ea49 (diff)
properly save external resources, fixes #1924
added API to get scancode names to OS
Diffstat (limited to 'modules/gdscript')
-rw-r--r--modules/gdscript/gd_script.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp
index 48269f4490..c9b00f49ac 100644
--- a/modules/gdscript/gd_script.cpp
+++ b/modules/gdscript/gd_script.cpp
@@ -343,6 +343,8 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
#endif
if (!valid) {
+#ifdef DEBUG_ENABLED
+
if (ret.get_type()==Variant::STRING) {
//return a string when invalid with the error
err_text=ret;
@@ -350,7 +352,9 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
} else {
err_text="Invalid operands '"+Variant::get_type_name(a->get_type())+"' and '"+Variant::get_type_name(b->get_type())+"' in operator '"+Variant::get_operator_name(op)+"'.";
}
+#endif
break;
+
}
#ifdef DEBUG_ENABLED
*dst=ret;