This is where all of the games are discussed.
Moderators: alietr, trainman, econgator, dhkendall
by Uncle Jeff » Tue Jul 12, 2011 1:30 pm
alietr wrote:I believe this is the code that calculates the percentages. If someone who knows code better than me is able to figure out how to get the percentages to calculate like they used to, I will implement the change. Thanks for any help!
- Code: Select all
foreach ($poll_info as $poll_option)
{
$option_pct = ($poll_total > 0) ? $poll_option['poll_option_total'] / $poll_total : 0;
$option_pct_txt = sprintf("%.1d%%", round($option_pct * 100));
...
);
}
The fix requires more data. Where is poll_total counted? Maybe it needs to count one per voter instead of one per option. Either that, or there might be another variable called something like voter_total. I'd need to hunt around in various parts of the polling code to suggest the best way to fix it.
In a free society, the most local level of government is the individual citizen
-

Uncle Jeff
- Resident phpBB Programmer
-
- Posts: 70
- Joined: Tue Jul 12, 2011 11:09 am
- Location: Vancouver, WA
-
by Volante » Thu Jul 14, 2011 11:04 pm
-

Volante
- Harbinger of the Doomed Lemur
-
- Posts: 1711
- Joined: Thu Jul 14, 2011 10:42 pm
by BoK » Mon Jul 18, 2011 10:33 am
-
BoK
- Loyal Jeopardista
-
- Posts: 121
- Joined: Mon Jul 18, 2011 10:04 am
by cinemaniax7 » Mon Jul 25, 2011 1:15 pm
-

cinemaniax7
- At Sea in the Jeopardy Pool
-
- Posts: 417
- Joined: Mon Jul 25, 2011 1:04 pm
- Location: Old Hickory, TN
Return to Game Discussions
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], Paucle and 10 guests