Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Player coloring for "odd" formations #4

Closed
minj opened this issue Mar 19, 2015 · 1 comment
Closed

Player coloring for "odd" formations #4

minj opened this issue Mar 19, 2015 · 1 comment

Comments

@minj
Copy link
Owner

minj commented Mar 19, 2015

Original issue 4 created by larsts on 2008-05-25T21:31:34.000Z:

What steps will reproduce the problem?

  1. Check match report for matchid 164631299
    (https://www.hattrick.org/goto.ashx?path=/Common/matchdetails.aspx%3FmatchID%3D164631299)

What is the expected output? What do you see instead?
Pedrosa is mentioned at the end of the first half, should be colored black
as he is part of déchaînés.

What version of the product are you using? On what operating system?
Foxtrick 0.3.65, XP.

Please provide any additional information below.
Seems playing 5-5-0 (no forwards) makes the player name extraction fail to
extract the first player in the formation (Pedrosa).
This is probably true for all formations with no people in one of the 4
parts of the formation (keeper/defender/midfielder/forward).

Hattrick adds a - after the last player in the formation for this match,
this makes matchDetailPlayerColoring extract an empty string as the first
playername in the playersOfTeamB array. index has reached 11 before coming
to Pedrosa.

Could probably (?) be amended by parsing the string left to right (with
indexOf instead of lastIndexOf), or by adding a if(newPlayerName=="")
index--; "hack".

@minj
Copy link
Owner Author

minj commented Mar 19, 2015

Comment #1 originally posted by kolmis on 2008-06-11T19:16:16.000Z:

Fiexd in 013b39f r54

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant