You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-21 14:57:09 +00:00
GDScript: Show warning messages only on debugger
Don't show on console/output anymore.
This commit is contained in:
@@ -606,9 +606,11 @@ Error GDScript::reload(bool p_keep_state) {
|
|||||||
}
|
}
|
||||||
#if DEBUG_ENABLED
|
#if DEBUG_ENABLED
|
||||||
for (const List<GDScriptWarning>::Element *E = parser.get_warnings().front(); E; E = E->next()) {
|
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) + ": ";
|
const GDScriptWarning &warning = E->get();
|
||||||
msg += E->get().get_message();
|
if (ScriptDebugger::get_singleton()) {
|
||||||
WARN_PRINTS(msg);
|
Vector<ScriptLanguage::StackInfo> si;
|
||||||
|
ScriptDebugger::get_singleton()->send_error("", get_path(), warning.line, warning.get_name(), warning.get_message(), ERR_HANDLER_WARNING, si);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user