Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Mo Firouz
@mofirouz
Hi @brad9mm - great question for the forum - could you kindly ask it there: https://forum.heroiclabs.com
HashtagGo
@HashtagGo
Didn't know what happened !
p1 and p2
don't know why player1 get the list of opponents
and player2 dont get the list of opponents
player1 send first request of matchmaking
Nitzan Zada
@mastern2k3
Hi guys
I'm looking for a way to retrieve the users ip
but can't find any documentation about it
is there a way to fetch a presence's ip? (or an rpc caller for that matter)
Nitzan Zada
@mastern2k3
nevermind, found runtime.RUNTIME_CTX_CLIENT_IP
Chris Molozian
@novabyte
Yep. That’s the context variable you want use to obtain the IP of the client. But be aware that if you don’t configure your load balancer correctly the forwarding IP will be the one from the load balancer!
Nitzan Zada
@mastern2k3
@novabyte got it
Brad
@brad9mm
in leave game method after LeaveMatchAsync called. is socketCloseAsync() should called?
await NakamaManager.Instance.Socket.LeaveMatchAsync(MatchId);
Chris Molozian
@novabyte

@brad9mm You don’t need to close the socket after you leave the match unless you don’t want to use the socket again.

The client sdk is designed to let you join and leave various streams related to features of the server like chat and multiplayer without closing the socket

Brad
@brad9mm
@novabyte thanks
Jon
@jon_morley_gitlab
I'm trying my hand at a go runtime module, I'm using nakama 2.6.0, and I have the 1.12.6 go tool chain installed. I'm getting the following message when I try and up the server "plugin was built with a different version of package errors". That's the correct version of go to be using?
Mo Firouz
@mofirouz
hey @jon_morley_gitlab could you ask this question on the forums please? This question has come up multiple times and we need to record the answer for the future :)
Jon
@jon_morley_gitlab
sure thing.
Chris Molozian
@novabyte
@jon_morley_gitlab This is a common issue with the Go runtime when you have a mismatch with your dependencies and the deps used by the server
I’ve covered it in detail on another post on the forums
elias teeny
@elias.teeny_gitlab
Hi guys, do you remember the problem of Nakama with Facebook instant games?
it works now out of nowhere
Brad
@brad9mm
Two devices uses the same account, this is not allowed. how to prevent this error
Jon
@jon_morley_gitlab
@mofirouz I posted that question about the correct version of go yesterday to the forum but it's gone now - was there an issue with the post? I now it was there as I added an additional comment to it after the original post.
oh I see Chris commented here and has already posted related to that. maybe he removed it as duplicate.
Fayyad Sufyan
@fsufyan
I have an issue with tournaments. When I manually delete a tournament and create it again and then posting a score it gives this error: "Could not write tournament record","error":"pq: failed to satisfy CHECK constraint (max_num_score > 0) "
until I restart the server then I can successfully post the score to tournament leaderboard
Mo Firouz
@mofirouz
@fsufyan what version of the server are you using atm?
  • if it’s earlier than 2.6.0, please update to 2.6.0 and try again.
  • If it’s 2.6.0, then it seems like this may be a bug in the server tournament cache. Could you open an issue on GitHub, and please put down the exact Lua/Go code that you used to create and delete the tournament so we can try and replicate it and fix it.
Kotob
@kotob-groovy_gitlab
Is it possible to get the current match_id in the runtime code?
I want to save it to the player's storage alongside a small state summary so players can see a list of ongoing games
I'm familiar with the storage so that's not an issue, but I can't seem to find a way to get the match_id on the server side
I'm guessing it might be somewhere in context
Kotob
@kotob-groovy_gitlab
Seems it's documented here instead of the ref, my bad https://heroiclabs.com/docs/runtime-code-basics/#register-hooks
Mo Firouz
@mofirouz
Yep that’s correct 👍
Terahard Studios
@terahardstudios_twitter
I had a question performance wise: I have created a small test case with 2 players updating the same save file whilst in a game.
Ive created a server side lua that saves the data so that there isn't any permission issues and having public access
then when one saves his stuff a notification is being sent to the other
that something has changed
so he accesses the storage to see what changed and syncs that way
is that a weird/unoptimized way of doing it or is it fine?
Carlos Nazareno
@object404_twitter
Hi guys! I'm having problems writing storage objects due to this error message: "ERROR: foreign key violation" when deploying my project to remote. I've posted my question in the forums: https://forum.heroiclabs.com/t/getting-error-foreign-key-violation-and-cannot-write-storage-object/134
can someone take a look?
Mo Firouz
@mofirouz
@object404_twitter I’ll take a look now - but please do not expect immediate or fast answers on Gitter or the forum - this is a community channel and we’ll try and help whenever we have a moment :)
Also, please don’t cross post both on the forum and Gitter :)
Carlos Nazareno
@object404_twitter
thanks!
Opeth001
@Opeth001
Hi everyone! :)
any news about adding Achievement feature ? ^_^
Ryan
@renhades
Hi guys~ is it possible to actively close the match from server? i try to kick users from the match but the match is still running in the match_loop, when is match stopped or closed?
Chris Molozian
@novabyte
Yes. You can return nil from the match loop which stops the match
It’s covered in the docs
Ryan
@renhades
@novabyte thanks!