Author Topic: Error Message ! :(  (Read 3563 times)

0 Members and 1 Guest are viewing this topic.

Offline GaYan

  • Sr. Member
  • ****
  • Posts: 301
  • ♫ | G2 | ♫
    • View Profile
    • Ziramagic
Error Message ! :(
« on: October 08, 2009, 01:20:28 PM »
Here Is the Error Message I Get :(

Code: [Select]
Warning: array_values() [function.array-values]: The argument should be an array in /home/g2gayan/public_html/users/djneed/onlinegame/includes/functions.php on line 2232

Warning: Wrong parameter count for max() in /home/g2gayan/public_html/users/djneed/onlinegame/includes/functions.php on line 2232

Warning: array_values() [function.array-values]: The argument should be an array in /home/g2gayan/public_html/users/djneed/onlinegame/includes/functions.php on line 2233

Warning: Wrong parameter count for min() in /home/g2gayan/public_html/users/djneed/onlinegame/includes/functions.php on line 2233

Warning: Invalid argument supplied for foreach() in /home/g2gayan/public_html/users/djneed/onlinegame/includes/functions.php on line 2240


I Have Attached my Function PHP and Here is the php coding between lines which erros occured !

Code: [Select]
       $flash_tag_clouds_text = "var so = new SWFObject(\"".TEMPLATE_PATH."/flash_tag_clouds.swf\", \"tagcloud\", \"".$flash_tag_clouds_width."\", \"".$flash_tag_clouds_height."\", \"7\", \"#".$flash_tag_clouds_flashcolor."\"); \n";
        if ($flash_tag_clouds_transparent == 'true') {
        $flash_tag_clouds_text .= "so.addParam(\"wmode\", \"transparent\"); \n";
        }
        $flash_tag_clouds_text .= "so.addVariable(\"tcolor\", \"0x".$flash_tag_clouds_textcolor."\");\n";
        $flash_tag_clouds_text .= "so.addVariable(\"mode\", \"tags\"); \n";
        $flash_tag_clouds_text .= "so.addVariable(\"distr\", \"true\"); \n";
        $flash_tag_clouds_text .= "so.addVariable(\"tspeed\", \"".$flash_tag_clouds_textspeed."\"); \n";
        $flash_tag_clouds_text .= "so.addVariable(\"tagcloud\", \"<tags>";
$sql = "SELECT i.word_id, i.word_text, COUNT(c.word_id) AS quantity
        FROM ".WORDLIST_TABLE." i
        LEFT JOIN ".WORDMATCH_TABLE." c ON i.word_id = c.word_id
        WHERE keys_match > 0
        GROUP BY i.word_text
        ORDER BY  RAND()
        LIMIT $flash_tag_clouds_textlimit";
$result = $site_db->query($sql);
while ($row = $site_db->fetch_array($result)) {
$tags[$row['word_text']] = $row['quantity'];
}
        $max_qty = max(array_values($tags));
        $min_qty = min(array_values($tags));

        $spread = $max_qty - $min_qty;
        if ($spread == 0) {
        $spread = 1;
        }
        $step = ($flash_tag_clouds_size_max - $flash_tag_clouds_size_min) / ($spread);
        foreach ($tags as $key => $value) {
        $size = round($flash_tag_clouds_size_min + (($value - $min_qty) * $step));
        // clean keys for flashtext:
        $key2 = $key;
        $key2 = str_replace('"',' ',$key2);
        $key2 = str_replace('&',' ',$key2);
        $key2 = str_replace('%',' ',$key2);
        $key2 = str_replace('>',' ',$key2);
        $key2 = str_replace('<',' ',$key2);
        $key2 = str_replace('+',' ',$key2);
        //
        $flash_tag_clouds_text .= "<a href='".$site_sess->url(ROOT_PATH."search.php?search_keywords=".$key.((!empty($mode)) ? "&amp;mode=".$mode : ""))."' style='".$size."'>".$key2." [".$value."]</a>";
        }
return $flash_tag_clouds_text;
}
/*----------------------- End MOD Flash-Tag-Clouds by KW ---------------------*/

can some 1 help me please ? :S

I Think its a Thing Cause Due to SIR KURTS MOD !
I'm Back :)

Offline V@nо

  • Addicted member
  • ******
  • Posts: 1.223
    • View Profile
Re: Error Message ! :(
« Reply #1 on: October 08, 2009, 03:56:42 PM »
In the code you've showed replace
$result $site_db->query($sql);

with:
if (!($result $site_db->query($sql)))
  return;
Your first three "must do" before you ask a question:
If I asked you to PM me, I meant PM to my primary account, this account doesn't accept PMs.

Offline GaYan

  • Sr. Member
  • ****
  • Posts: 301
  • ♫ | G2 | ♫
    • View Profile
    • Ziramagic
Re: Error Message ! :(
« Reply #2 on: October 10, 2009, 03:05:12 AM »
Thanks Sir :)
I'm Back :)