From dcab01618ae9eaa18e16b377728125379a8f48bc Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 7 Dec 2017 18:14:39 -0300 Subject: [PATCH] Fixed is_playing funtion (was reporting wrong), closes #13928 Made error reporting to opcode_set in gdscript a bit clearer --- modules/gdscript/gdscript_function.cpp | 4 ++-- scene/2d/animated_sprite.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp index f00ac1f7e63..d2ce318f82b 100644 --- a/modules/gdscript/gdscript_function.cpp +++ b/modules/gdscript/gdscript_function.cpp @@ -515,7 +515,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a } else { v = "of type '" + _get_var_type(index) + "'"; } - err_text = "Invalid set index " + v + " (on base: '" + _get_var_type(dst) + "')."; + err_text = "Invalid set index " + v + " (on base: '" + _get_var_type(dst) + "') with value of type '"+_get_var_type(value)+"'"; OPCODE_BREAK; } #endif @@ -574,7 +574,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a #ifdef DEBUG_ENABLED if (!valid) { String err_type; - err_text = "Invalid set index '" + String(*index) + "' (on base: '" + _get_var_type(dst) + "')."; + err_text = "Invalid set index '" + String(*index) + "' (on base: '" + _get_var_type(dst) + "') with value of type '"+_get_var_type(value)+"'."; OPCODE_BREAK; } #endif diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp index 4865858b7db..f8f94926b72 100644 --- a/scene/2d/animated_sprite.cpp +++ b/scene/2d/animated_sprite.cpp @@ -568,7 +568,7 @@ void AnimatedSprite::stop() { bool AnimatedSprite::is_playing() const { - return is_processing(); + return playing; } void AnimatedSprite::_reset_timeout() {