From e72717e3738ea7fe1a2a6c9447ad0090bdf297ec Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 17 May 2015 13:11:55 -0300 Subject: properly save external resources, fixes #1924 added API to get scancode names to OS --- modules/gdscript/gd_script.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/gdscript/gd_script.cpp') diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index 48269f449..c9b00f49a 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; -- cgit v1.2.3-70-g09d2