PDA

View Full Version : Invalid Monster Battle


DragoZERO
23 May 2006, 01:32
Great, thanks.

I have another problem: Many users are getting an "Invalid Battle" error, as in they are still in an active battle which they already clicked submit at the end of a battle.

Revan
23 May 2006, 20:44
I have a small number of people reporting this but I have been unable to reproduce.
Lets start easy; is this regular battle or monster battle?

DragoZERO
23 May 2006, 21:30
Monster battle.

Revan
27 May 2006, 14:04
Sorry about the delay.

Ok what I need you to do is this: Find an user that is experiencing this problem, and note down his userid.
Then run these queries, only replacing the userid with the userid you found:
SELECT monsterbattleid FROM rpg_user WHERE userid = '1'
SELECT userid FROM rpg_ibot_templates WHERE userid = '1'
And tell me what the results of each of these queries are.

DragoZERO
28 May 2006, 00:24
First query:

An error occurred while attempting to execute your query. The following information was returned.
error number: 1146
error desc: Table 'nt_vb.rpg_user' doesn't exist

2nd:
An error occurred while attempting to execute your query. The following information was returned.
error number: 1146
error desc: Table 'nt_vb.rpg_ibot_templates' doesn't exist

This is odd.. I don't recieve this errors when changing user info and editing the ibots.

Revan
28 May 2006, 00:55
You use a table prefix then. Append that before the name of the table (so if your prefix is vb_ the table name becomes vb_rpg_user) and try it again.
You can find your table prefix in the config.php file.

DragoZERO
28 May 2006, 07:47
My bad.

First query: 0
2nd query did not come up with any results.

Revan
28 May 2006, 10:31
I see.
And you are sure that the userid you used to query is infact stuck with that error? If you are, then run the following query:
UPDATE user SET rpg = '' WHERE userid = '1'
Adding the table prefix and replacing the userid as needed, and tell the user to refresh any RPG page, then see if he is still stuck with that error.

DragoZERO
30 May 2006, 16:28
That did it. Thanks a lot man. I'll be talking to you later, I'm sure I'll need more help later on. lol.

Revan
30 May 2006, 19:31
Okay, well then we have nailed what the problem is: The cache didn't update itself.
That should make it fixable. Thanks for the aid :)

PS: When next your users recieve this error, just run the Rebuild RPG Users maintenance function.

DragoZERO
02 Jun 2006, 05:13
Some of my members are getting the same error still. I ran the SQL query, along with the rebuild function. Suggestions?

Revan
02 Jun 2006, 06:27
They must be completing a new monster battle right after you running the queries thus making the problem reappear.
Ill see about bringing out a patch for this soon, got a final exam in 30 mins tho...

DragoZERO
04 Jun 2006, 10:33
A patch would be great. Good luck on the exam, hah.

Revan
08 Jun 2006, 11:46
Okay I know what to do now, I will see about updating the hack for 3.5.4 and 3.6.0 Beta 1 with a fix to this.
Thanks for the help :)