diff options
| author | Juan Linietsky | 2014-09-19 21:01:41 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2014-09-19 21:01:41 -0300 |
| commit | 0a557f3bf50a0ccff444003c5adc8078862e52c7 (patch) | |
| tree | 64fef2b54fa65f895239e2384cc8164549099f74 /modules/gdscript/gd_script.cpp | |
| parent | 549d344f0fef5e5748ded69b6a037698ff55f8bc (diff) | |
| download | godot-0a557f3bf50a0ccff444003c5adc8078862e52c7.tar.gz godot-0a557f3bf50a0ccff444003c5adc8078862e52c7.tar.zst godot-0a557f3bf50a0ccff444003c5adc8078862e52c7.zip | |
- more fixes on #672 on windows
- added #660, but need help on osx, help please I don't have a mac!
- fixed #667 and #668 (eol detection in comments)
- added #670 (hint when using method without () )
Diffstat (limited to 'modules/gdscript/gd_script.cpp')
| -rw-r--r-- | modules/gdscript/gd_script.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index 92962fa3f..10053d426 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -510,7 +510,11 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a *dst = src->get_named(*index,&valid); if (!valid) { - err_text="Invalid get index '"+index->operator String()+"' (on base: '"+_get_var_type(src)+"')."; + if (src->has_method(*index)) { + err_text="Invalid get index '"+index->operator String()+"' (on base: '"+_get_var_type(src)+"'). Did you mean '."+index->operator String()+"()' ?"; + } else { + err_text="Invalid get index '"+index->operator String()+"' (on base: '"+_get_var_type(src)+"')."; + } break; } |
