vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   RPG Integration Hack /w Battle (BETA) (https://vborg.vbsupport.ru/showthread.php?t=46417)

Bitsys 03-02-2003 01:28 PM

Quote:

Originally posted by Sonikku
One question.. i also got the error that sonic got about the 'itid4' thing...i was reading the posts trying to look for the fix but didnt manage to find it, can someone help plz?
I have tried to reproduce this error lots of times and I have not been successful. Could you give me a description of what you did before this occurred? Did you delete some categories? Add some? Also, can you give me the structure of the items_user table, as well as the category ids in the items_cats table?

This error isn't really going to break anything. However, it does prevent some items from being updated. If possible, could you give me which item gives you the error (or if you don't know, then you can post the error and I can try to figure it out).

One more thing, how many items in the `items` table have a 'cat' value of 4?

VeoMorphine 03-02-2003 04:12 PM

Ok, Im trying to make an addon so that the winner of a battle gets money when he or she wins. I have it all coded up but for some reasen it doesnt give money to the winner of the battle. I can update the DB from the admin panel just fine. But, when user battle and complete a battle, the winner doesnt get money.

I showed it to bitsys and even he thinks its fine. I'll attach the install info here. Take a look at it and see if you guys can fix it.

Darkwaltz4 03-02-2003 05:49 PM

i havent tested this:

but try changing
PHP Code:

$DB_site->query("UPDATE items_user SET bankval=bankval+$battleopt[batwinmon] WHERE userid='$battle[winnerid]'"); 

to

PHP Code:

$DB_site->query("UPDATE items_user SET bankval=bankval+$battleopt[batwinmon] WHERE userid=$battle[winnerid]"); 

anything in (')'s is usually translated into strings, and anything out of them are assumed numbers.

i know php will usually auto-cast variable types based on how you are trying to use them, but im not sure if mysql handles it the same. (i know mysql errors when you try to enter a obvious string to a number -> its not auto-cast as a 0) it may take the STRING "5677" (if thats what you set it as...) and turn it into 0, (because it sees the apostrophe and assumes it to be a string) because the string is being added to a number, so the string becomes a null number (0 in this case)

thats what i speculate, because it fits your description of what happens

i hope that made some sense

PSI|Dr-X 03-02-2003 06:53 PM

When does that summon come dark? please i need it :) thnx

p0wered 03-02-2003 07:37 PM

I am having the same problem PSI|Dr-X had, I installed the new version, this happens for all races under Mediator only. Please can you suggest some way to fix it? Thanks

VeoMorphine 03-02-2003 09:00 PM

Quote:

Originally posted by Darkwaltz4
i havent tested this:

but try changing
PHP Code:

$DB_site->query("UPDATE items_user SET bankval=bankval+$battleopt[batwinmon] WHERE userid='$battle[winnerid]'"); 

to

PHP Code:

$DB_site->query("UPDATE items_user SET bankval=bankval+$battleopt[batwinmon] WHERE userid=$battle[winnerid]"); 

anything in (')'s is usually translated into strings, and anything out of them are assumed numbers.

i know php will usually auto-cast variable types based on how you are trying to use them, but im not sure if mysql handles it the same. (i know mysql errors when you try to enter a obvious string to a number -> its not auto-cast as a 0) it may take the STRING "5677" (if thats what you set it as...) and turn it into 0, (because it sees the apostrophe and assumes it to be a string) because the string is being added to a number, so the string becomes a null number (0 in this case)

thats what i speculate, because it fits your description of what happens

i hope that made some sense

That didn't work. you can use ' on a var. i know that for sure. even in mysql.

Plus the rest of the hack uses commands like that.

msimplay 03-02-2003 10:14 PM

i installed it on my test board today which is version 2.30 Candidate 3

anyway check this out i think it might help u to work out bugs for coming releases

everything seems to work fine
But heres the links to the two problem pages

Main test board

Heal.php
&
Itemshop.php

personally i have seen the test boards and i think its an excellent hack
just wish it would work on 2.3

i have 2.3 candidate 1 on my boards production board

sonic3d 03-02-2003 11:20 PM

ok i got a minor problem. in the rpg cp. it says select new class/gender/etc (i made a new class for me). but in my profile it shows perfect. how do i fix this?

l8er
sonic

Moreliator 03-03-2003 12:28 AM

msimplay it works fine on 2.3 boards for me...

chrisz 03-03-2003 12:53 AM

Does this money thing work?
Can anyone approve of it?


All times are GMT. The time now is 03:59 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.02324 seconds
  • Memory Usage 1,755KB
  • 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
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (6)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete