title: Fatal error: Call to a member function Show_LastRec_Pack() on a non-object
body: <p>It has been already 5 days and still can't figure out where's the problem! so here i post the error and the whole code. Hopefully someone can help! I'll appreciate it very much.</p>
  
  <pre><code>Fatal error: Call to a member function Show_LastRec_Pack() on a non-object in packgames.php on line 69
  </code></pre>
  
  <p>here's "packgames.php":</p>
  
  <pre><code>&lt;?
  /**
   * Block Last Rec Pack
   **/
  define ('PACK_GAMES_TO_SHOW', 3);
  
  require_once ('recmod/constants.php');
  
  $query = "SELECT r.*, pp.topic_id, p.Nick, b.*, p.Rating
              FROM " . TABLE_RECGAMES . " r,  " . $this-&gt;db-&gt;obj['sql_tbl_prefix'] . "attachments a, " . $this-&gt;db-&gt;obj['sql_tbl_prefix'] . "posts pp,
                  " . TABLE_PLAYERS." p, recs_aoc_flags b
              WHERE a.attach_id = r.attach_id 
                  AND a.attach_rel_id = pp.pid 
                  AND r.Id_Player &gt; 0
                  AND p.Id_Player = r.Id_Player
                  AND b.flag_id = p.flag_id
              ORDER BY r.Id_RecordedGame DESC
              LIMIT " . PACK_GAMES_TO_SHOW;
  
  $this-&gt;DB-&gt;query($query);       
  $packs = array ();
  while ($player = $this-&gt;DB-&gt;fetch ())
  {
      $flag = '&lt;img src="' . PATH_FLAGS . $player['flag_image'] . '" alt="'.$player['flag_country'].'" title="' . $player['flag_country'] . '" align="absmiddle" border="0"&gt;';
  
      $packs[] = array (
        'GAMES' =&gt; $player['Players'],
        'PLAYER' =&gt; $player['Nick'],
        'FLAG' =&gt; $flag,
        'RATING' =&gt; $player['Rating'],
        'ID_POST' =&gt; $player['topic_id']
      );
  }
  $tmp = $this-&gt;registry-&gt;getClass('output')-&gt;getTemplate('recgames')-&gt;Show_LastRec_Pack ($packs);    
  echo $tmp;
  ?&gt;
  </code></pre>