summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2018-08-21 15:21:51 -0300
committerGeorge Marques <george@gmarqu.es>2018-08-21 20:29:33 -0300
commit4d2b9a4b352a86cb78331b136c05ec2538b2928b (patch)
tree6d04b52e86a40754f292b14d0db970ceb4be4290 /modules
parentfdf18a41985701aafb20d2f6d35f481fee22e6cc (diff)
GDScript: Show warning messages only on debugger
Don't show on console/output anymore.
Diffstat (limited to 'modules')
-rw-r--r--modules/gdscript/gdscript.cpp8
1 files 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<GDScriptWarning>::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<ScriptLanguage::StackInfo> si;
+ ScriptDebugger::get_singleton()->send_error("", get_path(), warning.line, warning.get_name(), warning.get_message(), ERR_HANDLER_WARNING, si);
+ }
}
#endif