-
Notifications
You must be signed in to change notification settings - Fork 24
problem with fortniteleaderboardData #8
Comments
Can you paste the code you're trying to run? |
@Fyris looks like a problem with the code you added. You're trying to calculate the custom properties (kill/death, win/loss, etc) without doing a check to make sure the divisor in each statement isn't zero. This would be an issue for people who haven't played the game but want to use this library for stat lookup or something. I'll add the checks and commit the change. |
I was using the example leaderboard code that came in the distribution $auth = Auth::login('epic_email@domain.com','password'); |
@Tustin Yeah, i was aware of that when he opened the issue but leader boards should not call any methods that gets stats, leader boards only return a list of names. That's why i asked him to paste the code. @AlbyMangels Try this one, as @Tustin renamed the method in one of his latest commits
|
oh ok thanks |
Oh my bad! I like to use the shorthand names like that because some of the previous ones just seem redundant. Although I am surprised that PHP only throws a warning on a division by zero error. |
Thanks Fyris and my bad I probably should have dug a bit deeper. |
I am now using php 7 but am getting this error? Any ideas?
PHP Warning: Division by zero in /var/www/fortnitetest/vendor/tustin/fortnite-php/src/Model/FortniteStats.php on line 72
PHP Fatal error: Uncaught Error: Call to undefined method Fortnite\Leaderboard::getLeaderboardData() in /var/www/fortnitetest/basic2.php:18
Stack trace:
#0 {main}
thrown in /var/www/fortnitetest/basic2.php on line 18
The text was updated successfully, but these errors were encountered: