Version: , by SemperFideles
Developer Last Online: Jun 2018
Version: Unknown
Rating:
Released: 01-19-2008
Last Update: Never
Installs: 0
No support by the author.
I've had a successful installation of the arcade for some time. I have a lot of games that have high scores recorded.
I went to pbflashgames.com today and installed three new games per the instructions in the zip file. They run and display correctly but when I finish the game the score is not being saved. In other words, the default games in ibProArcade are saving their high scores but the high scores for the new games are not being recorded.
A few other details:
1. I run vBulletin 3.6.8
2. I have the vBA CMPS 3.0 RC2 installed.
3. At the top of my index.php under <?php is:
case "saveGame":
$_GET['do'] = "pnFSaveGame";
break;
case "loadGame":
$_GET['do'] = "pnFLoadGame";
break;
case "loadGameScores":
$gid = $vbulletin->input->clean_gpc('p', 'gid', TYPE_INT);
$uid= $vbulletin->userinfo['userid'];
$game = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "games_scores WHERE mid=$uid AND gid = $gid ORDER BY score DESC LIMIT 0,1");
$scores = $game[score];
if($scores != false)
{
//Return true
print "&opSuccess=true&gameScores=$scores&endvar=1"; //send endvar to keep opSuccess separate from all other output from PostNuke
}
else
{
print "&opSuccess=false&error=Error&endvar=1";
}
break;
}
}
PNflashgames are mostly designed to submit their score "in the background", which means your result gets sent to the arcade while you can play again and again.
If you just exit, get back to the arcade and check the scores, I guess there are saved results from your play.
Make sure to think of the setting "save only users top score", if you have this enabled and do not beat your best result so long, there is nothing that gets stored in the database at all.
PNflashgames are mostly designed to submit their score "in the background", which means your result gets sent to the arcade while you can play again and again.
If you just exit, get back to the arcade and check the scores, I guess there are saved results from your play.
Make sure to think of the setting "save only users top score", if you have this enabled and do not beat your best result so long, there is nothing that gets stored in the database at all.
Please verify ...
Thank you for the quick reply.
1. I do have "save only users top score" enabled but these are brand new games where the top score for each is 0 - Frogger, Joust, Ms. PacMan
2. I've played a couple of these games twice and registered a score, left the arcade, and no score is recorded as the high score.
3. I've logged in as a completely different user, visited the new games and no high score is recorded.
I've had a successful installation of the arcade for some time. I have a lot of games that have high scores recorded.
I went to pbflashgames.com today and installed three new games per the instructions in the zip file. They run and display correctly but when I finish the game the score is not being saved. In other words, the default games in ibProArcade are saving their high scores but the high scores for the new games are not being recorded.
A few other details:
1. I run vBulletin 3.6.8
2. I have the vBA CMPS 3.0 RC2 installed.
3. At the top of my index.php under <?php is:
case "saveGame": $_GET['do'] = "pnFSaveGame"; break;
case "loadGame": $_GET['do'] = "pnFLoadGame"; break;
case "loadGameScores": $gid = $vbulletin->input->clean_gpc('p', 'gid', TYPE_INT); $uid= $vbulletin->userinfo['userid']; $game = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "games_scores WHERE mid=$uid AND gid = $gid ORDER BY score DESC LIMIT 0,1"); $scores = $game[score];
if($scores != false) { //Return true print "&opSuccess=true&gameScores=$scores&endvar=1"; //send endvar to keep opSuccess separate from all other output from PostNuke } else { print "&opSuccess=false&error=Error&endvar=1"; } break; } }
case "saveGame": $_GET['do'] = "pnFSaveGame"; break;
case "loadGame": $_GET['do'] = "pnFLoadGame"; break;
case "loadGameScores": $gid = $vbulletin->input->clean_gpc('p', 'gid', TYPE_INT); $uid= $vbulletin->userinfo['userid']; $game = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "games_scores WHERE mid=$uid AND gid = $gid ORDER BY score DESC LIMIT 0,1"); $scores = $game[score];
if($scores != false) { //Return true print "&opSuccess=true&gameScores=$scores&endvar=1"; //send endvar to keep opSuccess separate from all other output from PostNuke } else { print "&opSuccess=false&error=Error&endvar=1"; } break; } }
In all index.php files from the root of your site as well as in your main forums folder.
pnflashgames send there scores to the root folders index.php file this is why you need to add this code to the index.php file.
If you want me to have alook for you i will do so gladly,
Just PM me or send me a e-mail to webmaster@michealmilton.com with your admincp login and ftp URL username and pass and ill look at it for you.
SemperFideles, do you have this working yet? If so, what did you do to fix it.
I am having the exact same problem, but the suggestions are not working for me. I did notice that in my vBadvanced main options, the CMPS URL is set to /cmps_index.php. Should the ibProArcade code be added to the top of this file? If the forum is located at /forum shouldn't the include references that? i.e. In the root index.php (or cmps_index.php) should include "arcade.php" be include "forum/arcade.php" or perhaps include "http:<domain name>/forum/arcade.php" ?
I'll donate to Mr Zeropage if I can get this working. I've found it's a great way for my members to vent their frustrations rather than flaming each other in the forum.
ibProArcade-code for index.php always needs to be inserted to index.php no matter where this file comes from. The games are hardcoded to submit their results to index.php
In your case I guess it must be /forum/index.php as the arcade is always sending to forum's root index.php and not the domain's root
If you want me to make this running, contact me via PM and refer to this posting...