MySQL doesn't load stats?
#1

Hello, I am having trouble with my MySQL database. I own a MySQL database using volt-host, I have set up everything correctly. The only problem is it doesn't load my stats like `Kills` `Deaths` `XP` ect.. it reads it on the database but when I log onto the server they are all set to 0.. The register system works perfectly, is there anything I can do to fix this? ;)
Reply
#2

Without code?
Reply
#3

Quote:
Originally Posted by ReVo_
View Post
Without code? :)
That's what I mean what code do I put in? ;p
Reply
#4

put mysql_debug(1); under OnGameModeInit(), try to login again and read mysql_log.txt
Reply
#5

Quote:
Originally Posted by VincentDunn
View Post
put mysql_debug(1); under OnGameModeInit(), try to login again and read mysql_log.txt
It is already under OnGameModeInit, but anyway here is the log..

[16:13:46] CMySQLHandler::Query(SELECT `Username` FROM users WHERE Username = 'Labrinth' AND password = SHA1('<3')) - Successfully executed.
[16:13:46] >> mysql_store_result( Connection handle: 1 )
[16:13:46] CMySQLHandler::StoreResult() - Result was stored.
[16:13:46] >> mysql_num_rows( Connection handle: 1 )
[16:13:46] CMySQLHandler::NumRows() - Returned 1 row(s)
[16:13:46] >> mysql_query( Connection handle: 1 )
[16:13:46] CMySQLHandler::Query(SELECT * FROM `users` WHERE Username = 'Labrinth') - Successfully executed.
[16:13:46] >> mysql_store_result( Connection handle: 1 )
[16:13:46] CMySQLHandler::StoreResult() - Result was stored.
[16:13:46] >> mysql_fetch_row_format( Connection handle: 1 )
[16:13:46] CMySQLHandler::FetchRow() - Return: 1|Labrinth|44ea86be67060d7a28c805c564767e8b86aed72 4|0|10|0|0|7|4|2|58|26|34|0|923
[16:13:46] >> mysql_free_result( Connection handle: 1 )
[16:13:46] CMySQLHandler::FreeResult() - Result was successfully free'd.
[16:13:46] >> mysql_free_result( Connection handle: 1 )
[16:13:46] CMySQLHandler::FreeResult() - The result is already empty.
[16:17:22] >> mysql_query( Connection handle: 1 )
[16:17:22] CMySQLHandler::Query(UPDATE `users` SET `pXP` = '1000', `pKills` = '0', `pDeaths` = '0', `pRank` = '0', `pAdminLevel` = '7', `pVipLevel` = '0', `pHour` = '0', `pMin` = '3', `pSec` = '20', `pMapsPlayed` = '1', `pCoins` = '0' WHERE `Username` = 'Labrinth') - Successfully executed.
Reply
#6

The last part is it OnPlayerDisconnect or you are trying to set the player's data by using this?
I'm assuming that these are the data it loaded:
pawn Code:
CMySQLHandler::FetchRow() - Return: 1|Labrinth|44ea86be67060d7a28c805c564767e8b86aed72 4|0|10|0|0|7|4|2|58|26|34|0|923
Debug it then, store the data to variables and print the variables. If they are successfully printed, something is wrong on the storing of data.
Reply
#7

This is the log...

Where's the code?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)