I have been trying to create a simple app in Godot (my first ever) that sends raw UDP packets on button press. It works fine on desktop, but not on Android (connected to same wifi).
The put_packet() functions seems to return mysterious error code 1 on Android. What does that mean?
Here's the script:
var udp = PacketPeerUDP.new();
var data = RawArray()
func _ready():
# Called every time the node is added to the scene.
# Initialization here
udp.set_send_address("192.168.1.84", 16001)
data.push_back(0)
data.push_back(0)
data.push_back(0)
data.push_back(0)
func _on_left_button_pressed():
data.set(0,1)
var err = udp.put_packet(data)
if(err == OK):
get_node("TitleLabel").set_text("left")
else:
get_node("TitleLabel").set_text("Error: " + str(err))
Where are these errors codes documented? I took a quick look at Godot source code, but didn't find them there either..