PDA

View Full Version : Scores not saving?



Romanos
09-14-2015, 09:50 PM
I've enabled the option to allow every score to be saved, and yet it will still not save them.

stangger5
09-15-2015, 12:03 AM
Most games need the (INFO - vbadvanced or another Portal) edit that comes with the arcade.

Editing the index.php file..

Romanos
09-15-2015, 01:25 AM
Having a brain fart, so what would need to be done? Thank you for helping me. :)

blind-eddie
09-15-2015, 02:08 AM
Look in the readme for installing the arcade, the info you need is there.

Romanos
09-15-2015, 04:39 AM
I added the following to my index.php:

// ibProArcade
if($_POST['module'] == "pnFlashGames")
{
require_once('./global.php');

switch($_POST['func'])
{
case "storeScore":
$_GET['act'] = "Arcade";
$_GET['module'] = "arcade";
$_GET['do'] = "pnFStoreScore";
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;
}
}

$act = $_GET[act];
$autocom = $_GET[autocom];
$showuser= $_GET[showuser];
if($act == "Arcade" || $autocom=="arcade") {
include "arcade.php";
exit();
}
if(!empty($showuser) && $showuser >= 1) {
$u = $showuser;
$_GET[u] = $showuser;
include "member.php";
exit();
}

// end of ibProArcade
----------------------------------------------------------

blind-eddie
09-15-2015, 11:23 PM
You should be good to go.

Romanos
09-16-2015, 05:25 AM
You should be good to go.

It actually did not change anything, and actually gave me an error for my index.php file. I did a backup though so it fixed the error, but adding that in did not change anything.

Terror
09-16-2015, 10:23 AM
what kind of error? wich cms are you using?

stangger5
09-16-2015, 05:27 PM
You must have over wrote something in your index.php file..

At the very beginning of the File, right after:
----------------------------------------------------------

<?php

you have to insert:
----------------------------------------------------------

// ibProArcade
if($_POST['module'] == "pnFlashGames")
{
require_once('./global.php');

switch($_POST['func'])
{
case "storeScore":
$_GET['act'] = "Arcade";
$_GET['module'] = "arcade";
$_GET['do'] = "pnFStoreScore";
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;
}
}

$act = $_GET[act];
$autocom = $_GET[autocom];
$showuser= $_GET[showuser];
if($act == "Arcade" || $autocom=="arcade") {
include "arcade.php";
exit();
}
if(!empty($showuser) && $showuser >= 1) {
$u = $showuser;
$_GET[u] = $showuser;
include "member.php";
exit();
}

// end of ibProArcade

Romanos
09-16-2015, 07:40 PM
what kind of error? wich cms are you using?

I'm not using a CMS at all.

Romanos
09-19-2015, 05:04 AM
Is that all I need to add?

ulgen
09-19-2015, 06:12 AM
same issue. :(

stangger5
09-19-2015, 01:07 PM
Is that all I need to add?

Yes.


same issue. :(

Do the index.php edit from post #9.

Romanos
09-19-2015, 06:50 PM
I did the edit, and it is still not working.

Romanos
09-21-2015, 07:45 PM
Bump. The edit was made and it's not working.

stangger5
09-22-2015, 05:10 PM
I would have to see whats going on..

Romanos
09-22-2015, 07:09 PM
I would have to see whats going on..

What information do you need?

Romanos
09-23-2015, 02:10 AM
Info sent. :)