Hi,
created the the groups for the championship and created the predictions. 2 players have put in their predictions and they are already showing some points without scores being inserted, why ?
regards
Radio Streaming - 50% Lifetime Discount with purchase of any Joomla Web Radio Addon. Discount Code: STR15-Z
See Radio Streaming Plans
Hi,
created the the groups for the championship and created the predictions. 2 players have put in their predictions and they are already showing some points without scores being inserted, why ?
regards
Hello,
There was an issue when the player predicted a draw , in the application logic the match is draw even before it starts, you can change the code to handle this exception with the following code
file : <joomla installation>/components/com_masterleaguepro/views/playerprediction/tmpl/default.php
around line 285
FROM :
TO:Code:<td><?php if($item->home_score==$item->home_prediction&&$item->away_score==$item->away_prediction){ echo "5"; $totalPoints=$totalPoints+5; }else if( ($item->home_score>$item->away_score&&$item->home_prediction>$item->away_prediction) || ($item->home_score<$item->away_score&&$item->home_prediction<$item->away_prediction) || ($item->home_score==$item->away_score&&$item->home_prediction==$item->away_prediction) ){ echo "3"; $totalPoints=$totalPoints+3; }else{ echo "0"; } ?></td>
Code:<td><?php if($item->start_date<=date("Y-m-d H:i:s")){ if(isset($item->home_score)&&isset($item->away_score)&&$item->home_score!=""&&$item->away_score!=""){ if($item->home_score==$item->home_prediction&&$item->away_score==$item->away_prediction){ echo "5"; $totalPoints=$totalPoints+5; }else if( ($item->home_score>$item->away_score&&$item->home_prediction>$item->away_prediction) || ($item->home_score<$item->away_score&&$item->home_prediction<$item->away_prediction) || ($item->home_score==$item->away_score&&$item->home_prediction==$item->away_prediction) ){ echo "3"; $totalPoints=$totalPoints+3; }else{ echo "0"; } }else{ echo "0"; } }else{ echo "0"; } ?></td>
the fix will be included in the next update
Many thanks for the reply.
I have changed the code and now all showing 0 points as it should.
regards