Error as condition

Godot Version

Godot Engine v4.2.1.stable.official.b09f793f5 - https://godotengine.org

Question

I was wondering if an error can be detected for a condition, for example:

if error:
message_error.visible = true

In my case, it would be for upnp errors, detecting errors to display an error message on the screen.

I’ve found a solution to my problem, I’m having the errors checked, in my case with upnp:

var discover_result = upnp.discover()
	
	if discover_result != 0 :
		error.visible = true

I helped myself with this:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.