• soku13

    (@soku13)


    Hi Kolja. You’re doing great job. I’ve found one error in the code. In Rugby it should be this way:

    if ( $match->tries[$index] > 3 )
    $points[‘plus’] += 1;

    // Current Team Lost Match with less than 8 points
    if ( $match->loser_id == $team_id && abs($match->home_points-$match->away_points) < 8 )
    $points[‘plus’] += 1;

    You have lesst than 6 points and more than 4 tries. In rules it’s extra points for 7 or less and 4 or more.

    https://www.ads-software.com/plugins/leaguemanager/

Viewing 2 replies - 1 through 2 (of 2 total)
  • cducauze

    (@cducauze)

    Hi Soku13,

    I’ve changed the code as well, however there is a little mistake in your code. You don’t get a bonus if you score 4 tries are more but if you score 3 more tries than the over team.

    The problem of the plugin is that he uses world rugby rules (world cup and european cut) : if you score 4 tries you get a bonus when in France it’s now 3 more tries.

    As a consequence, I’ve changed the code like that :

    // Default : Bonus = 4 tries
    //if ( $match->tries[$index] > 4 )

    // French rules : Bonus = +3 tries
    if ( $match->winner_id == $team_id && abs($match->tries[‘home’]-$match->tries[‘away’]) >= 3 )
    $points[‘plus’] += 1;

    // Current Team Lost Match by 7 points or less
    if ( $match->loser_id == $team_id && abs($match->home_points-$match->away_points) <= 7 )
    $points[‘plus’] += 1;

    Hope that help you ??

    The very problem with rugby is that league points changes depending on the League you are playing in (for example, in France they use a different system point than in England). I developed an alternate class and you can find some more info here: https://www.ads-software.com/support/topic/rugby-alternate?replies=2

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Rugby – points’ is closed to new replies.