diff options
| author | Anton Yabchinskiy | 2015-04-04 09:31:21 +0300 |
|---|---|---|
| committer | Anton Yabchinskiy | 2015-04-04 09:31:21 +0300 |
| commit | 16746f157f83d666079ba3266acec13d35b84c3f (patch) | |
| tree | 8c872d18ccdef90a15e72622cd0139e0e64801a6 /modules/gdscript/gd_script.cpp | |
| parent | 43713810deaadfec6a1656767cf5520073e58a06 (diff) | |
| parent | 5d99e15e43d5a446b35d48e8a3b08a478f1998a9 (diff) | |
| download | godot-16746f157f83d666079ba3266acec13d35b84c3f.tar.gz godot-16746f157f83d666079ba3266acec13d35b84c3f.tar.zst godot-16746f157f83d666079ba3266acec13d35b84c3f.zip | |
Merge branch 'master' of github.com:okamstudio/godot
Diffstat (limited to 'modules/gdscript/gd_script.cpp')
| -rw-r--r-- | modules/gdscript/gd_script.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index d3a9abf4b..06c746c4f 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -337,9 +337,10 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a Variant::evaluate(op,*a,*b,*dst,valid); if (!valid) { - if (false && dst->get_type()==Variant::STRING) { + if (dst->get_type()==Variant::STRING) { //return a string when invalid with the error err_text=*dst; + err_text += " in operator '"+Variant::get_operator_name(op)+"'."; } 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)+"'."; } |
