[Fixed] Scores are swapped in at the SMO results screen.

Information and error posts in regards to testing.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
User avatar
foxfire667
Moderator
Posts: 557
Joined: Sat Sep 29, 2012 5:09 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

[Fixed] Scores are swapped in at the SMO results screen.

Postby foxfire667 » Wed Oct 03, 2012 7:22 pm

You may have heard this from others, but I'll put it here since it isn't listed in the bug report thread or the graveyard.

When there are multiple people in an SMO room, sometimes the scores are swapped around at the results screen. This means that I cannot actually tell which scores were obtained by which player, which is a little bit obnoxious when I want to compare with people. Obviously this isn't a major issue, but since it is frequently occurring, I figure it should be brought to your attention. Hopefully this can be resolved in the near future!

houkouonchi
Site Admin
Posts: 156
Joined: Sun Sep 16, 2012 1:12 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Scores are swapped in at the SMO results screen.

Postby houkouonchi » Wed Oct 03, 2012 8:10 pm

We are indeed aware of the issue. For some reason it is listing the users in room order (not score order) even though there is code there to sort it by score.

Its something that definitely will be getting fixed in the future.

Its only a major problem right now if you have more than 3 people playing as you can still usually tell who is who by the modifiers that they are using.

User avatar
blind
Posts: 157
Joined: Mon Oct 01, 2012 3:38 pm
Contact:

Re: Scores are swapped in at the SMO results screen.

Postby blind » Wed Oct 03, 2012 8:11 pm

Yeah, hou said it should be an easy fix. It actually just shows up in order of the room.

Edit: ninja'd. -_-
First to get 1,000,000 xp.
R.I.P. first place. :(

User avatar
Angelo
Posts: 72
Joined: Sat Oct 06, 2012 4:31 am
Location: The Netherlands
Contact:

Re: Scores are swapped in at the SMO results screen.

Postby Angelo » Tue Oct 16, 2012 12:48 pm

Hou, please remind me, where exactly did I put this code? :P
- Angelo
developer

User avatar
Cube
Site Admin
Posts: 354
Joined: Mon Sep 24, 2012 10:18 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Scores are swapped in at the SMO results screen.

Postby Cube » Tue Oct 16, 2012 2:43 pm

Looks like it was in User.cs

This file has changed quite a bit since I las looked at it. I remember it being in the NSCGON function before...

Now I don't really know and am super busy right now to really search for it.

User avatar
Angelo
Posts: 72
Joined: Sat Oct 06, 2012 4:31 am
Location: The Netherlands
Contact:

Re: Scores are swapped in at the SMO results screen.

Postby Angelo » Tue Oct 16, 2012 3:05 pm

- Angelo
developer

User avatar
Cube
Site Admin
Posts: 354
Joined: Mon Sep 24, 2012 10:18 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Scores are swapped in at the SMO results screen.

Postby Cube » Tue Oct 16, 2012 3:12 pm

Awesome thanks. So it looks like you took this out in one of the commits, is this the same code just added back in?

I will get it compiled and tested tonight.

User avatar
Angelo
Posts: 72
Joined: Sat Oct 06, 2012 4:31 am
Location: The Netherlands
Contact:

Re: Scores are swapped in at the SMO results screen.

Postby Angelo » Tue Oct 16, 2012 3:24 pm

For some reason, it magically disappeared out of the main Git repository. I'm not sure why, but I re-added the code and changed the order of the players in the list to match the room order. It should work fine now.
- Angelo
developer

houkouonchi
Site Admin
Posts: 156
Joined: Sun Sep 16, 2012 1:12 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Scores are swapped in at the SMO results screen.

Postby houkouonchi » Tue Oct 16, 2012 6:59 pm

This appears like it might be fixed however at the end the users are not listed in score order. Honestly I can live with for now as long as the names/scores always match up.

User avatar
foxfire667
Moderator
Posts: 557
Joined: Sat Sep 29, 2012 5:09 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Scores are swapped in at the SMO results screen.

Postby foxfire667 » Wed Oct 17, 2012 6:12 pm

This might not be completely killed yet.

It works perfectly fine with two people, but when I was playing in a room with 3 or more participants, the scores were getting mixed up again.

houkouonchi
Site Admin
Posts: 156
Joined: Sun Sep 16, 2012 1:12 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Scores are swapped in at the SMO results screen.

Postby houkouonchi » Wed Oct 17, 2012 7:53 pm


User avatar
foxfire667
Moderator
Posts: 557
Joined: Sat Sep 29, 2012 5:09 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Scores are swapped in at the SMO results screen.

Postby foxfire667 » Wed Oct 17, 2012 9:03 pm

Last edited by foxfire667 on Wed Oct 17, 2012 9:11 pm, edited 1 time in total.
Reason: quote fail

houkouonchi
Site Admin
Posts: 156
Joined: Sun Sep 16, 2012 1:12 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Scores are swapped in at the SMO results screen.

Postby houkouonchi » Thu Oct 18, 2012 12:24 am

This is finally fixed (order by top score) and player/names match.

Previously it was in score order but ID's were in room order. the cause was pretty strait forward when i finally dug into the code.

Before the array was being re-ordered. That was working fine but when it sent the name index it was just using a for loop and sending i (not touching the re-ordered index) which meant the value for which name it was would always be in order 0, 1, 2 etc.. in the room/connection to server order.

I just applied the same logic Angelo used in another part (during play the combo/grade/score update thingy) and have another for loop (as j) inside the original using the original array and when the array values are equal instead of using i it uses the j value instead of i.

Long story short scores now are in score descending order and names match their score/counts.

User avatar
blind
Posts: 157
Joined: Mon Oct 01, 2012 3:38 pm
Contact:

Re: Scores are swapped in at the SMO results screen.

Postby blind » Thu Oct 18, 2012 3:32 pm

Awesome man, thanks! Was quite an annoyance that was tolerable.
First to get 1,000,000 xp.
R.I.P. first place. :(


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “Bug Reports ONLY”

Who is online

Users browsing this forum: No registered users and 7 guests