vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   RPG Integration Hack (https://vborg.vbsupport.ru/forumdisplay.php?f=102)
-   -   New posts not adding xp (https://vborg.vbsupport.ru/showthread.php?t=77780)

Cyricx 03-09-2005 11:57 AM

New posts not adding xp
 
Currently posting is not adding xp. Did you change the new post code from the first V3 you sent out?

Might I suggest that you name them 3.1, 3.2, etc as ya hammer out at the bugs? :)

Revan 03-09-2005 01:43 PM

Are you sure you turned the setting on?
Because I gain EXP just fine and Im using the same code as you (else I wouldn't have anything to compare the v2 and v3 file changes against, eh? :p)

And naming them 3.1 etc would cause me to end up with 3.1245653434 before it oculd be labelled final ;)
Nah I only increase version number as DB changes are needed :p

Cyricx 03-09-2005 03:48 PM

Postive it's on.

Set to yes and xp per post is 1.

I doubled checked my code in the newreply and newthread to your last zip, matches. And I even checked my database to ensure the values are there.

Both rpg_givepostexp and rpg_expperpost are set to 1.

Revan 03-09-2005 05:01 PM

This is utterly weird.
You seem to be the only one having this problem, yet I can't find anything wrong with the setting, be it 1 or 10....

Try removing the "$vboptions['rpg_givepostexp'] == 1 AND " from the if() in newreply, then try to make a post.
If this does not fix it, readd it and remove " AND $vboptions['rpg_expperpost'] > 0" from the if() and try again.

This should get us one step closer to fixing it, at least for your forum.

Cyricx 03-09-2005 08:44 PM

I'll definately have to run those when I get home.

The weird thing is, it's adding points when you post a new thread..

but not when you reply :ermm:

Fixed. I think it was where the code was being put. I checked out the newthread mod and it put it just above where it started defining the variables, so I moved the newreply code to the same spot and it worked.

Short version to fix this bug if you have it like I did.

Open newreply.php

Find:
Code:

        $newpost['title'] = $_POST['title'];


ABOVE IT PUT:
Code:

        // rpg
        // Itemshop code by Mewtwo and Battle Code by Bitsys
        if ($vboptions['rpg_givepostexp'] == 1 AND $vboptions['rpg_expperpost'] >

0)
        {
                $DB_site->query("UPDATE " . TABLE_PREFIX . "user SET

xp=xp+$vboptions[rpg_expperpost] WHERE userid='$bbuserinfo[userid]'");
        // End Itemshop code by Mewtwo and Battle Code by Bitsys
                if ($bbuserinfo['inbattle'] == 0 AND

$bbuserinfo['inmonsterbattle'] == 0)
                {
                        process_rpg_stats($bbuserinfo);
                }
        }
        //end auto-update stats add-on for the RPG Integration Hack by Bitsys


Revan 03-10-2005 01:31 PM

Ah good you got it fixed. I never would have guessed to do what you did there :p
I'm not sure I want to put this in the official version if you are the only one this is happening to, because since it works for everyone else (so far), fixing something that ain't broken...;)


All times are GMT. The time now is 03:21 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.00964 seconds
  • Memory Usage 1,721KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete