Posted: Sat Oct 08, 2005 7:52 am Post subject: high score error
i can not save highscores with the old componment it is do do with this in the error log
in /home/igamer/public_html/site/modules/Flash_Games/includes/oldcomponent.php on line 15
[07-Oct-2005 09:40:35] PHP Fatal error: Call to undefined function: cookiedecode()
how do i fix it!
forahobby Administrator
Joined: May 22, 2003 Posts: 23912 Location: NSW, Australia
Posted: Sat Oct 08, 2005 8:22 am Post subject:
Hi dragongamer,
First i need to know what version of PHPNUKE you are running..
Then i need to know which version of pnFlashGames for PHPNUKE you are running.. Please give as much info as possible.
Then i can tell you what line 15 is..lol
talk soon.. dont worry i havent seen a post yet where the module wouldnt work apart from if you re using PHPNUKE 7.9+
<?php
// **** REMEMBER ****
// Still need to post/redirect to the one StoreScore function.
// At the moment there are two seperate storescore functions.
// 1 x old pnFlashGames component (oldcomponent.php)
// 1 x v1.0+ pnFlashGames component (modules/Flash_Games/index.php)
//
// All data needs to be redirected to modules/Flash_Games/index.php?func=storeScore
//
if ($player_score >0){
}else{
echo "&opSuccess=false&error=notloggedin&endvar=1";
die();
}
if ($uname == "Anonymous"){
echo "&opSuccess=false&error=notloggedin&endvar=1";
die();
}
// ######################################
// ## GET INFO FROM SWF GAME COMPONENT ##
// ############################################################
@$func = $_REQUEST['func'];
@$game_id = $_REQUEST['gid'];
@$player_name = $_REQUEST['uname'];
@$player_score = $_REQUEST['score'];
$player_name = $uname;
//#############################################################
//##################################
//## INSERT HISCORES INTO PHPNUKE ##
//###############################################################
$currdate = time();
$date = "$currdate";
$sql2 = "SELECT gname FROM ".$prefix."_flashgames_games WHERE gid=$game_id LIMIT 0,1";
$count = 0;
$result = $db->sql_query($sql2);
while ($row = $db->sql_fetchrow($result)) {
$game_name = "$row[gname]";
}
// check if user has already got this score in the database
$sql2 = "SELECT * FROM ".$prefix."_flashgames_hiscores WHERE gid=$game_id and playerscore=$player_score";
$count = 0;
$result = $db->sql_query($sql2);
if(sql_num_rows($result, $db) > 0) {
// identical score found so display error that game not saved
echo "&opSuccess=false&error=notloggedin&endvar=1";
die();
}else{
// no score found for user so save this score
sql_query("INSERT INTO $prefix"._flashgames_hiscores." (hid,gid,gamename,playername,playerscore,date) VALUES ('','$game_id','$game_name', '$player_name','$player_score','$date')", $dbi);
}
$result = sql_query("update ".$prefix."_flashgames_games set hits=hits+1 WHERE gid='$game_id'", $dbi);
//################################################################
echo '&opSuccess=true&endvar=1';
$gameData= "&opSuccess=true&endvar=1";
return urlencode($gameData);
}
##########################################################################
?>
hope this helps
p.s while are looking at this when i upload a game from the admin it sayit uploaded it but when i look in coanel filemanger in the games dictionary it never shows up?
forahobby Administrator
Joined: May 22, 2003 Posts: 23912 Location: NSW, Australia
Posted: Sun Oct 09, 2005 7:23 am Post subject:
hi dragongamer,
you are the first one yet to have this error out of hundreds of installs so i will have to actually install nuke 7.7 and test as well.. Unfortunately right now im very busy with xboxhq site upgrades.. I will be done hopefully by the end of this month..
The weekend is just about over here but ill do my best to have a quick look for a fix for you.
anyway, sorry for the dramas.. Maybe they have changed the cookies or removed that function in the phpnuke your using?? I dont know!
Quote:
while are looking at this when i upload a game from the admin it sayit uploaded it but when i look in coanel filemanger in the games dictionary it never shows up?
Check your directory permissions.. Give full read/write permission on the games directory and the screenshots directory in the flashgames module.. You do this using a ftp client like flashfxp cuteftp in the options.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum