Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > Premium Archives > ibProArcade Archive
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools
Installed Games from pnFlashGames - Doesn't save score... Details »»
Installed Games from pnFlashGames - Doesn't save score...
Version: , by SemperFideles SemperFideles is offline
Developer Last Online: Jun 2018 Show Printable Version Email this Page

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:
PHP Code:
// 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 
Is this a known issue or am I missing something?

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-19-2008, 11:04 AM
MrZeropage's Avatar
MrZeropage MrZeropage is offline
 
Join Date: Nov 2003
Location: Munich, Germany
Posts: 3,012
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ...
Reply With Quote
  #3  
Old 01-19-2008, 11:16 AM
SemperFideles's Avatar
SemperFideles SemperFideles is offline
 
Join Date: Oct 2006
Location: Northern VA
Posts: 223
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MrZeropage View Post
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.
Reply With Quote
  #4  
Old 01-19-2008, 11:43 AM
MrZeropage's Avatar
MrZeropage MrZeropage is offline
 
Join Date: Nov 2003
Location: Munich, Germany
Posts: 3,012
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you have latest ibProArcade v2.6.6+ ?
Reply With Quote
  #5  
Old 01-20-2008, 04:23 AM
SemperFideles's Avatar
SemperFideles SemperFideles is offline
 
Join Date: Oct 2006
Location: Northern VA
Posts: 223
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MrZeropage View Post
you have latest ibProArcade v2.6.6+ ?
Yes sir.
Reply With Quote
  #6  
Old 01-22-2008, 05:39 PM
micheal332001 micheal332001 is offline
 
Join Date: Apr 2004
Posts: 1,112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SemperFideles View Post
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:
PHP Code:
// 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 
Is this a known issue or am I missing something?
Hi there

I have just tested the new version of the arcade with pnflashgames and its sending the scores as it should be.

Please make sure you have put this
PHP Code:
// 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 
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.
Reply With Quote
  #7  
Old 01-28-2008, 09:14 AM
haytham's Avatar
haytham haytham is offline
 
Join Date: Jan 2003
Location: USA-Egypt-UAE
Posts: 510
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You mean I have to put this in my vb/index.php ?

Please make it clearer. Thanks
Reply With Quote
  #8  
Old 02-07-2008, 03:07 PM
arob42 arob42 is offline
 
Join Date: Nov 2004
Location: Dallas
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.

--Robert
Reply With Quote
  #9  
Old 02-08-2008, 06:13 AM
MrZeropage's Avatar
MrZeropage MrZeropage is offline
 
Join Date: Nov 2003
Location: Munich, Germany
Posts: 3,012
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #10  
Old 02-08-2008, 07:54 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So we can't use pnFlashGames without modifying our forums index.php file?
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:16 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04556 seconds
  • Memory Usage 2,351KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete