Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Błąd ze Skryptem.., prosze o pomoc
Jankes
post 3.05.2006, 17:50:25
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 3.05.2006

Ostrzeżenie: (0%)
-----


Kod
Fatal error: Call to a member function on a non-object in /home/accounts_j/jankes/public_html/var/chatmsgs.php on line 60

Tak wygląda błąd.. a znajduje się on w tej części Kodu :

  1. <?php
  2. require_once('includes/config.php');
  3. require_once('libs/Smarty.class.php');
  4.  
  5. $smarty = new Smarty;
  6. $smarty -> compile_check = true;
  7.  
  8. $pass = md5($_SESSION['pass']);
  9. $stat = $db -> Execute("SELECT id, rank, lang, seclang, style, graphic FROM players WHERE email='".$_SESSION['email']."' AND pass='".$pass."'");
  10.  
  11. /**
  12. * Get the localization for game
  13. */
  14. require_once("languages/pl/chatmsg.php");
  15.  
  16. /**
  17. * Select style for chat
  18. */
  19. if ($stat -> fields['graphic'])
  20. {
  21.     $smarty -> template_dir = "./templates/".$player -> graphic;
  22.     $smarty -> compile_dir = "./templates_c/".$player -> graphic;
  23.     $strCss = '';
  24. }
  25.     else
  26. {
  27.     $smarty -> template_dir = './templates';
  28.     $smarty -> compile_dir = './templates_c';
  29.     $strCss = $stat -> fields['style'];
  30. }
  31.  
  32. $chat = $db -> SelectLimit("SELECT * FROM chat WHERE lang='".$stat -> fields['lang']."' OR lang='".$stat -> fields['seclang']."' AND ownerid=0 OR ownerid=".$stat -> fields['id']." OR senderid=".$stat -> fields['id']." ORDER BY id DESC", 15);
  33. $span = (time() - 180);
  34. $pl = $db -> Execute("SELECT id, rank, user FROM players WHERE lpv>=".$span." AND page = 'Chat'");
  35. $numon = $pl -> RecordCount();
  36. $pl -> Close();
  37. $arrtext = array();
  38. $arrauthor = array();
  39. $arrsenderid = array();
  40. $i = 0;
  41. if ($stat -> fields['rank'] == 'Admin' || $stat -> fields['rank'] == 'Staff') 
  42. {
  43.     $smarty -> assign ("Showid", 1);
  44. }
  45. while (!$chat -> EOF) 
  46. {
  47.     $text = wordwrap($chat -> fields['chat'],30,"\n",1);
  48.     $arrtext[$i] = $text;
  49.     $arrauthor[$i] = $chat -> fields['user'];
  50.     $arrsenderid[$i] = $chat -> fields['senderid'];
  51.     $chat -> MoveNext();
  52.     $i = $i + 1;
  53. }
  54. $chat -> Close();
  55.  
  56. $smarty -> assign ( array(
  57.     "Text1" => $i,
  58.     "Online" => $numon, 
  59.     "Author" => $arrauthor, 
  60.     "Text" => $arrtext, 
  61.     "Senderid" => $arrsenderid,
  62.     "Charset" => CHARSET,
  63.     "Thereis" => THERE_IS,
  64.     "Texts" => TEXTS,
  65.     "Cplayers" => C_PLAYERS,
  66.     "Cid" => C_ID,
  67.     "CSS" => $strCss));
  68.     
  69. $smarty -> display ('chatmsgs.tpl');
  70. ?>


I nie wiem czemu.. czytałem dużo o tym błędzie.. ale i tak nei wiem co mam Tu zmienić aby działało.. dodam tez że jest to skrypt czatu znajdującego się w Silniku Gry php ,,Vermilion Engine" Prosze o Pomoc sad.gif

Ten post edytował dr_bonzo 3.05.2006, 18:12:40
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 4.07.2025 - 22:06