PDA

View Full Version : Scores not saving for certain games



Pages : [1] 2

forgames
05-15-2014, 07:50 PM
Hello!

I have a vBulletin 4.2.0 forum on which I've just installed ibProArcade v2.7.2. I edited the index.php and the scores are saved.

However, I noticed that some games don't save the score, however, on this forum here, they save the score and I downloaded the game from here.

An example is Candy Crush (http://www.next-level-arcade.com/ibproarcade.php?&act=Arcade&do=play&gameid=422/candy-crush.html).

I noticed that, when saving the score, it calls for this /index.php?act=Arcade&do=newscore instead of /index.php?act=Arcade&do=savescore

Should I add some line in the index.php to make games calling for 'newscore' register the scores too?

Thank you!

stangger5
05-18-2014, 01:07 AM
savescore and newscore is coded within the arcade.php file..

The code added to the index.php file has,


if($act == "Arcade" || $autocom=="arcade")

and tells it to add the arcade.php file here,

{
include "arcade.php";
exit();
}

so it should save score using either code..

Did it give any kind of error ??

forgames
05-18-2014, 01:37 PM
Hello and thank you for the reply!

Yes, each time the game calls for /index.php?act=Arcade&do=newscore, it gives this error: This score was not submitted from the game. Your score will not be saved.

I checked the index.php and those codes you mentioned are there. It's weird that all scores that call /index.php?act=Arcade&do=savescore submit the score.

Here is the printscreen:
http://i57.tinypic.com/ips3gm.jpg

There is some additional code that I should add in arcade.php?

stangger5
05-18-2014, 04:28 PM
Sometimes you`ll get that when your session timeouts..

What do you have yours set to ?
Admincp >> Settings>> Options >> Cookies and HTTP Header Options:
Session Timeout

I have mine set to 900..

forgames
05-18-2014, 07:35 PM
I have it set to 1000. And many games submit the scores, just those calling the /index.php?act=Arcade&do=newscore seems not to work.

forgames
05-24-2014, 05:45 PM
Any other ideas? The issue still persists

plubius2
06-22-2014, 02:20 PM
I GET THE SAME ERROR. using VBULL 3.8 "This score was not submitted from the game. Your score will not be saved."

stangger5
06-22-2014, 03:40 PM
1. increase your session timeouts in vbulletin settings..

2. inform your members to use the remember me box when they log in..
Log out and then back in with the remember me checked..

3. inform your members not to use the refresh or back buttons in their browser to start a new game..

4. inform your members to only play 1 game at a time..

5. Enable debug-mode, open /arcade.php and set $DEBUGMODE to value 2 (right at the beginning of the script)
Errormessage has extended information when set to 2..You can post the error messages here..

6. Do you have any kind of cookie-blocker ??

fcgame
06-26-2014, 07:26 PM
:something:..............

plubius2
07-07-2014, 01:09 AM
5. Enable debug-mode, open /arcade.php and set $DEBUGMODE to value 2 (right at the beginning of the script)
Errormessage has extended information when set to 2..You can post the error messages here..


When I did this I could not even get back into the arcade took me to a white that said that was an error in the configuration to and to uhm contact myself with what I was doing when I received the error. All the other stuff I have tried and none of it worked. I am only playing the game that won't save (candy crush), I increased session length to 1000, I am always logged in, and I don't use the refresh button. Could it actually be something wrong with the game itself?

plubius2
07-07-2014, 01:12 AM
Oh and I have no cookie blockers

stangger5
07-07-2014, 05:18 PM
Give this a try:

Find this in the main arcade.php file.



$DB->query("SELECT * FROM ibf_games_list WHERE gid=".$userinfo['arcade_sess_gid']);
$g = $DB->fetch_row();

Replace it with this:


$DB->query("SELECT * FROM ibf_games_list WHERE gname='".$swfgname . "'");
$g = $DB->fetch_row();

Fine:

$vs['start'] = $gametime;

Replace it with this:


$vs['start'] = $gametime - 1.0;

plubius2
07-08-2014, 12:39 AM
ok, on it like the sweet smell off a freshly baked lasagna

plubius2
07-08-2014, 01:00 AM
ok applied edits and now it will not load games and give me a recover webpage error

plubius2
07-08-2014, 01:11 AM
ok I got the games to load in chrome but had to refresh to get candy crush to load, but it did not save the score.

stangger5
07-08-2014, 03:49 AM
Do you have a index.php file in your root ? and did you add the code from the INFO - vbadvanced or another Portal that comes with the arcade ??

Did you try logging out and back in and make sure you checked,, remember me..?

Has this game saved scores for anyone ?

Can you delete the game,,download it again and try to install it again..

stangger5
07-08-2014, 05:37 PM
I still had your FTP access so I went in looking for the problem..

First you didnt have the code in the index.php file ,,So I added it
and
I changed this in the main arcade.php

$DEBUGMODE = 0;
to

$DEBUGMODE = 2;
So I can see the error message..
I can see in the message the game name was missing the word and..
It should have been : candyCrushAS3v2Th
but it was showing: cyCrushAS3v2Th
See the (and) was missing..

To fix this,,
find this in main arcade.php:

function ibp_cleansql($value)
{
if( get_magic_quotes_gpc() )
{
$value = stripslashes( $value );
}
//check if this function exists
if( function_exists( "mysql_real_escape_string" ) )
{
$value = mysql_real_escape_string( $value );
}
//for PHP version < 4.3.0 use addslashes
else
{
$value = addslashes( $value );
}

// remove any SQL-commands
$sqlcomm[] = 'create';
$sqlcomm[] = 'database';
$sqlcomm[] = 'table';
$sqlcomm[] = 'insert';
$sqlcomm[] = 'update';
$sqlcomm[] = 'rename';
$sqlcomm[] = 'replace';
$sqlcomm[] = 'select';
$sqlcomm[] = 'handler';
$sqlcomm[] = 'delete';
$sqlcomm[] = 'truncate';
$sqlcomm[] = 'drop';
$sqlcomm[] = 'where';
$sqlcomm[] = 'or';
$sqlcomm[] = 'and';
$sqlcomm[] = 'values';
$sqlcomm[] = 'set';
$sqlcomm[] = 'password';
$sqlcomm[] = 'salt';
$sqlcomm[] = 'concat';
$sqlcomm[] = 'schema';
$value = recursive_str_ireplace($sqlcomm, '', $value);

return $value;
}

Replace with this:


function ibp_cleansql($value)
{
if( get_magic_quotes_gpc() )
{
$value = stripslashes( $value );
}
//check if this function exists
if( function_exists( "mysql_real_escape_string" ) )
{
$value = mysql_real_escape_string( $value );
}
//for PHP version < 4.3.0 use addslashes
else
{
$value = addslashes( $value );
}
return $value;
}

Thats it,,the game saves scores now..

plubius2
07-08-2014, 10:15 PM
Thanks 50 million times Stangger. I was at work while you were doing this. By the way, I beat your score, didn't think I would. lol You are welcome to my site anytime. It is nice to see a mod like this so supported. Again thank you.

blind-eddie
11-15-2014, 04:05 PM
For some reason, over time some but not all my games are not recording scores, even some that were recording scores before.
Example: In my Apple Shooter game all the scores were changed to 2 or 1 on each that had played, they were higher. I play the game, get 6 and it says 0.
Seems as if something is breaking down over time.
I tried the edits you posted her with no luck and have the arcade set to debug mode but I don't see anything.

What do you think my issue could be?

stangger5
11-17-2014, 08:40 PM
Have you deleted any games lately ?