extends Node
var client : NakamaClient
var session : NakamaSession
var socket : NakamaSocket
var username = "example"
var play_service
func _ready():
if Engine.has_singleton("GodotPlayGamesServices"):
play_service = Engine.get_singleton("GodotPlayGamesServices")
play_service.init(true, true, true, "id")
play_service.connect("_on_sign_in_success", self, "ConnectToNakama")
play_service.connect("_on_sign_in_failed", self, "_on_sign_in_failed")
play_service.signIn() # <-
func _on_sign_in_failed(status:int) -> void:
pass
func ConnectToNakama(account_id:String) -> void:
var split = account_id.split('"')
var id = str(split[11])
print(id)
print(username)
client = Nakama.create_client('defaultkey', "ip", 7351,
'http', 3)
session = yield(client.authenticate_device_async(id, username), 'completed')
if session.is_exception():
print("connection has failed " + session.exception.message)
return
socket = Nakama.create_socket_from(client)
yield(socket.connect_async(session), "completed")
print("Connected!")
Server version: 3.14.0+e2df3a29 Godot version: 3.5.1
I get this error code: DEBUG === Freeing request 1 01-15 22:52:00.542 20046 20263 I godot : === Nakama : DEBUG === Request 1 returned response code: 404, RPC code: 5, error: Not Found 01-15 22:52:00.542 20046 20263 I godot : connection has failed Not Found
I double checked evrything but I can't find the problem help much aprecciated
I've fixed the issue with the help of someone. You just have to change the port from 7351 to 7350 because 7351 is for admins