|
Post by eleclerc on May 17, 2020 0:03:13 GMT
Try this..
$standings->{$b}->{'pct'} <=> $standings->{$a}->{'pct'} || $standings->{$b}->{'w'} <=> $standings->{$a}->{'w'} || ($standings->{$b}->{'gf'} - $standings->{$b}->{'ga'}) <=> ($standings->{$a}->{'gf'} - $standings->{$a}->{'ga'}) || $standings->{$b}->{'gf'} <=> $standings->{$a}->{'gf'} || $standings->{$b}->{'p'} <=> $standings->{$a}->{'p'} I never coded in perl, so, I just figured out, this is something like this...
If it's not working try also this one... Just write this line for those five lines...
$standings->{$b}->{'p'} <=> $standings->{$a}->{'p'}
|
|
|
Post by Slanger on May 17, 2020 0:49:46 GMT
Try this.. $standings->{$b}->{'pct'} <=> $standings->{$a}->{'pct'} || $standings->{$b}->{'w'} <=> $standings->{$a}->{'w'} || ($standings->{$b}->{'gf'} - $standings->{$b}->{'ga'}) <=> ($standings->{$a}->{'gf'} - $standings->{$a}->{'ga'}) || $standings->{$b}->{'gf'} <=> $standings->{$a}->{'gf'} || $standings->{$b}->{'p'} <=> $standings->{$a}->{'p'} I never coded in perl, so, I just figured out, this is something like this... If it's not working try also this one... Just write this line for those five lines... $standings->{$b}->{'p'} <=> $standings->{$a}->{'p'} OK both methods worked except that ONE team is out of sequence in the standings for some reason:
|
|
|
Post by Slanger on May 17, 2020 2:43:09 GMT
Update:
The second method prevented the XtraStats (all of it) from updating, it would output but nothing updated.
Reverted back to the first method you described and it's back still showing one team out of sequence, but it's a different team this time (I think it's the same position, 5th overall, he should be at 6th).
|
|
|
Post by eleclerc on May 17, 2020 12:24:00 GMT
It's weird, because now the code is doing it's job. Is't now the first row and in sorted the team by pct!!! So the code should be good with "p" on top. This how it should...
|
|
|
Post by Slanger on May 17, 2020 14:36:06 GMT
OK I didn't notice it was the win%. Well it's better that goals for
When I run it through tableSim the problem goes away so once I have that up the problem is solved!
|
|
|
Post by Slanger on May 17, 2020 16:26:24 GMT
It's weird, because now the code is doing it's job. Is't now the first row and in sorted the team by pct!!! So the code should be good with "p" on top. This how it should... I tried this (changing the top row to 'p', moving the 'pct' to the bottom row) and it went back to GF sorting...
|
|
|
Post by eleclerc on May 17, 2020 17:21:41 GMT
This is old code with new Active Perl... This can add to the problem...
Back in the day, it worked great. Just use my table page if you want it correctly displayed.
|
|
|
Post by Slanger on May 17, 2020 17:23:33 GMT
This is old code with new Active Perl... This can add to the problem... Back in the day, it worked great. It's not a big deal, like I said it sorts properly through TableSim - and Win% is a much better sorting order than GF so it's better.
|
|