Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Andrei Mihu
@zyro
That looks valid at least yes
Fayyad Sufyan
@fsufyan
I also tried using this format by adding the .[server node name] but still gives me invalid match id
Andrei Mihu
@zyro
You're not supposed to add that yourself, the nk.match_create function returns a fully-formatted match ID
Fayyad Sufyan
@fsufyan
it returns that by default but I though that was an invalid format, however even the returned string in the screenshot is not working!
Screen Shot 2019-08-12 at 11.25.11 PM.png
Andrei Mihu
@zyro
Then there's a problem with your join request, beacuse it definitely works
Make sure you use the correct match join function, with the correct arguments
Also make sure you don't have anything that might interfere, like a before hook on match joins
Fayyad Sufyan
@fsufyan
I noticed something on this, check the screenshot you will find different match id on server and the one received
Screen Shot 2019-08-12 at 11.33.05 PM.png
Although I am using the standard example on the docs to generate match id and rpc call
Fayyad Sufyan
@fsufyan
@zyro I finally got this! the issue comes from me using the TinyJson library to parse the matchid, apparently it has a bug with the match uuid part that leads to a different parsed uuid check the screenshot and notice the raw response from rpc before being parsed and after being parse
Screen Shot 2019-08-12 at 11.41.18 PM.png
TinyJson.JsonParser.FromJson<string>(payload) causes the invalid match uuid
Chris Molozian
@novabyte
@fsufyan can you share some of the c# code that caused the problem? I'm curious about exactly what was going on
AlexandreK38
@AlexandreK38
@novabyte Hi! Is there a way to fetch the number of participants for a given leaderboard?
I thought that we could do with a registered lua function and SQL on leaderboard_record table, but I was wondering if there is something better
Chris Molozian
@novabyte
@Kumamon38 You want the count of all users on the leaderboard with at least one record submitted?
AlexandreK38
@AlexandreK38
yeah
Chris Molozian
@novabyte
Hmmm that can be pretty expensive to calculate in the database. How many records do you expect to be entered with each leaderboard?
will they be small leaderboards or do you expect them to involve the entire player base?
AlexandreK38
@AlexandreK38
Every player could use it, but I don't think they will all
AlexandreK38
@AlexandreK38
The aim was to have random records, but I think we will use a random on last ones it will be better for the perf
@novabyte just to be sure, when the leaderboard is set to "best", there is only one record per user?
Chris Molozian
@novabyte
@Kumamon38 Yep only one record per user
AlexandreK38
@AlexandreK38
okay thanks :)
Chris Molozian
@novabyte
I don't know that there's a good way to get a total count of records because if we have leaderboard records that number in the millions the row count will be extremely slow
That's why none of the APIs in Nakama rely on the limit and offset to perform database level paging
helps to ensure we can seek straight to the continuation point in a btree index
@Kumamon38 are you using leaderboards at the moment or is this for a new feature?
AlexandreK38
@AlexandreK38
@novabyte it's for a new feature, I wanted to pick random users in it, that's why of the count, but I think the best solution is to pick X random at the end and avoid perf issue
And it will be better
Chris Molozian
@novabyte
Yep I think it'll be better performing at scale. I'll think of another way to select random users in a set of records for a leaderboard
AlexandreK38
@AlexandreK38
@novabyte alright :)
In fact this will used as little tournaments, but instead of creating many little tournaments, we just pick x random users
Chris Molozian
@novabyte
@fsufyan There was some SSL code changes you recommended about the Unity client sdk at one point. What was the enhancement you wanted to make?
Fayyad Sufyan
@fsufyan
@novabyte The problem with matchId is that I was trying to parse the matchID itself as the json object, it looks like I was overworking and forgot that I should just use the plain string without parsing
Fayyad Sufyan
@fsufyan
@novabyte As for the SSL thing it was this exception: "TlsException: Handshake failed - error code: UNITYTLS_INTERNAL_ERROR, verify result: UNITYTLS_X509VERIFY_FLAG_NOT_TRUSTED"
I think it was a problem with TLS v1.2 so I did make a fallback to previous versions if supported on server using: System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12 | System.Net.SecurityProtocolType.Tls11 | System.Net.SecurityProtocolType.Tls;
Besides configuring the callback to always return true
Ryan
@renhades
Hi, is there any plan to support any testing framework for custom runtime module?
Chris Molozian
@novabyte
@renhades Right now you can test your code from Go with just the standard Go test packages although it's best used when you have non-Nakama runtime calls to make
i.e. logic which can be independently tested
And with Lua I should probably write something detailed up on how to go about testing
can you ask the question on the forums and I'll put my notes there?
Thanks @fsufyan do you think it's something I should incorporate into the next client sdk release? Make it clearer how to set the various SSL cert versions the client sdk will be allowed to accept?
Cameron Hall
@CamDHall
@novabyte as I commented on the Github issue, I'm not just running "client.NewSocket()". I'm using the exact code in the docs. With the Connected and Closed listeners and ConnectAsync being called. There's nothing different about our Unity code, except we're using " UnityWebRequestAdapter.Instance" per your suggestion. Our token is set to expire after 8 minutes. I pull this out and put it in a test project with no other code, and I get the same results.
@novabyte I can confirm it creates the user successfully, with no errors.
Mohsen
@mohsenyz
Hello guys, I was looking in my leaderboard records, in database. I wondered that there were records assigned to usernames that didn't belong to anyone. For example, there was a record submitted by user X, while there is not any user named X. In my scenario, users have a default username before registration, and after registration, the username changes by the user. I think leaderboard records are not updated after updating the username, leading me to this issue, Am I right?
Now I'm almost sure that updating account doesn't update leaderboard records, I checked the records owner id, It belongs to a valid user, with a valid username Y. while still record username is X