PHPQA sending score fix

Posted on : 30-06-2009 | By : Ron | In : PHPQA | Comments: 1 Comment

If you are familiar with the PHP-Quick-Arcade script made by Jcink, you know there is a bug in that script about sending score. Basically, if you load multiple game pages and then play one earlier loaded game, when you submits your score in that game your score will be submitted to the last game you loaded earlier. This is a big glitch and need to be fixed. I was not aware of that bug until some of my members at arcadevine complained about it. After some experiments with the codes, I finally came up with a solution. I tested this fix in my high score games website and many of my members also tested it and told me that the glitch has been fixed. Since then nobody has ever complained to me about the sending score bug. Also, I have tested this fix various ways and I am sure that it works.

Previously I have posted this fix to the Jcink forum which can be accessed here. I have updated that fix a little bit to add support to all types of games. You can get the fix below. Just replace some codes in the ‘Arcade.php’ in your website with the codes I provided below.

In Arcade.php find the below code:

1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
} else if ($id || $_GET['do'] == "newscore" || $_GET['autocom']) {
$thescore = $_POST['thescore'];
if ($_GET['do'] == newscore) {
$id=htmlspecialchars($_POST['gname'], ENT_QUOTES);
$thescore = $_POST['gscore'];
}
 
if ($_GET['autocom']) {
 
$id=htmlspecialchars($_COOKIE['gname'], ENT_QUOTES);
$thescore = $_POST['gscore'];
 
}

Replace the above code with the below code:

1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
} elseif ( $id || $_GET['do'] == "newscore" || $_GET['do'] == 'savescore' || $_GET['autocom'] == 'arcade' || $_POST['autocom'] == 'arcade') {
 
$id = $_POST['gname'];
if($id==NULL) $id= $_REQUEST['id'];
 
//For other games
$thescore = $_POST['thescore'];
 
//For v32 games
if ($_GET['autocom'] == 'arcade' || $_POST['autocom'] == 'arcade') {
if ($_GET['do'] == 'savescore' || $_GET['do'] == 'newscore') {
$thescore = $_POST['gscore'];
if ($thescore==NULL) $thescore= $_POST['thescore'];
if ($thescore==NULL) $thescore= $_GET['scoreVar'];
}
}
 
//For v2 games
if ($_GET['do'] == 'savescore' || $_GET['do'] == 'newscore') {
$thescore = $_POST['gscore'];
if ($thescore==NULL) $thescore= $_POST['thescore'];
if ($thescore==NULL) $thescore= $_GET['scoreVar'];
}

Before you start modifying the ‘Arcade.php’ file in your directory, be sure to back up that file first. If you mess up things while editing and adding my ‘fix’ you can always restore things using that backup. So, always back up files before editing. If you have any problems you can always reach me at admin@celebrityon.com. Also, if you need professional installation service to install the script or to add any mod or fix you can mail me at the above address and we can come up with a suitable agreement.

Anyway, if you add my fix to your website and liked it, a link to celebrityon.com or arcadevine.com will be well appreciated. This is for today guys, I’ll be adding more mods and fixes to PHP-Quick-Arcade, so check back regularly and have fun!

VN:F [1.8.0_1031]
Rating: 6.7/10 (3 votes cast)
VN:F [1.8.0_1031]
Rating: +1 (from 1 vote)
PHPQA sending score fix6.7103

Comments (1)

Hi,
Ugh, I liked! So clear and positively.
Joker

UN:F [1.8.0_1031]
Rating: 4.0/5 (1 vote cast)
UN:F [1.8.0_1031]
Rating: 0 (from 0 votes)

Write a comment

CommentLuv Enabled