From 4d2b9a4b352a86cb78331b136c05ec2538b2928b Mon Sep 17 00:00:00 2001 From: George Marques Date: Tue, 21 Aug 2018 15:21:51 -0300 Subject: GDScript: Show warning messages only on debugger Don't show on console/output anymore. --- modules/gdscript/gdscript.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index b987d2897f..5125b58b41 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -606,9 +606,11 @@ Error GDScript::reload(bool p_keep_state) { } #if DEBUG_ENABLED for (const List::Element *E = parser.get_warnings().front(); E; E = E->next()) { - String msg = "Script warning: " + E->get().get_name() + " (" + path + ") line " + itos(E->get().line) + ": "; - msg += E->get().get_message(); - WARN_PRINTS(msg); + const GDScriptWarning &warning = E->get(); + if (ScriptDebugger::get_singleton()) { + Vector si; + ScriptDebugger::get_singleton()->send_error("", get_path(), warning.line, warning.get_name(), warning.get_message(), ERR_HANDLER_WARNING, si); + } } #endif -- cgit v1.2.3