PDA

View Full Version : 3 hours later and still cant figure this out...lease help me


VolSports
03-20-2002, 07:55 AM
i own a hiphopboard and i keep tract of everyones wins and losses.....at first i wanted a meter to display ther average..but now i dont care..i just want something that gos up if they got a good record and down if they got a bad record...i tried to use this in the admin/functions.php and i keep gettin a parase error on line 893 wich is "if ($avgrecord < 1)"

$avgrecord = ($post[field7] - $post[field8])

if ($avgrecord < 1)
{ $avbar = "1"; }
elseif ($avgrecord < 3
{ $avbar = "2"; }
elseif ($avgrecord < 6
{ $avbar = "3"; }
elseif ($avgrecord < 9
{ $avbar = "4"; }
elseif ($avgrecord < 12
{ $avbar = "5"; }
elseif ($avgrecord < 15
{ $avbar = "6"; }
elseif ($avgrecord < 18
{ $avbar = "7"; }
elseif ($avgrecord < 21
{ $avbar = "8"; }
else
{$avbar = ""; }

any ideas?

Admin
03-20-2002, 08:06 AM
You need a ; at the end of the first line.

VolSports
03-20-2002, 06:14 PM
thanx firefly, that worked....now im adding

<td><font size="1" color="#FFFFFF"><img src="{imagesfolder}/bxg.gif" width="5" height="$avbar%" ><img src="{imagesfolder}/bxb.gif" width="5" height="1"></font></td> into the postbit and that dont work...it screws everything up...

any ideas?