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

BUG - Division 0 in $users. #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bunchaban
Copy link

:)

@derilevi
Copy link

I think this is a better solution:
if ($users!=0) { $percents = 100 * (($tribes[0]-2) / $users); }
else
{ $percents=0; }

https://github.com/derilevi/Travianx/blob/master/Templates/Ranking/general.tpl

@ZZJHONS
Copy link

ZZJHONS commented Nov 21, 2011

No, this:
if ($users > 0){$percents = 100*($tribes[0] / $users);} else {$percents=0; }

PD: Change the tribe array: $tribes[0], $tribes[1], $tribes[2]

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

Successfully merging this pull request may close these issues.

3 participants