mirror of
https://github.com/godotengine/godot.git
synced 2026-02-07 19:32:36 +00:00
Merge pull request #115549 from Calinou/doc-upnp-update-example
Fix UPNP code sample using `OK` constant incorrectly
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
var upnp = UPNP.new()
|
||||
var err = upnp.discover()
|
||||
|
||||
if err != OK:
|
||||
if err != UPNP.UPNP_RESULT_SUCCESS:
|
||||
push_error(str(err))
|
||||
upnp_completed.emit(err)
|
||||
return
|
||||
@@ -37,7 +37,7 @@
|
||||
if upnp.get_gateway() and upnp.get_gateway().is_valid_gateway():
|
||||
upnp.add_port_mapping(server_port, server_port, ProjectSettings.get_setting("application/config/name"), "UDP")
|
||||
upnp.add_port_mapping(server_port, server_port, ProjectSettings.get_setting("application/config/name"), "TCP")
|
||||
upnp_completed.emit(OK)
|
||||
upnp_completed.emit(UPNP.UPNP_RESULT_SUCCESS)
|
||||
|
||||
func _ready():
|
||||
thread = Thread.new()
|
||||
|
||||
Reference in New Issue
Block a user