Page 1 of 1

Saving XP problem with mysql

Posted: Sat Dec 10, 2005 9:24 am
by cacantre
Hi,
I am running:

War3ft vs. 2.2.9
Amxmodx 1.60
metamod 1.18p26
mysql 4.0.25
The OS is linux

// Warcraft 3 Frozen Throne Configuration File
mp_savexp 1
sv_sql 1
FT_saveby 0

// SQL configuration
FT_sql_host "127.0.0.1"
FT_sql_user "*****"
FT_sql_pass "*******"
FT_sql_db "******"
FT_auto_pruning 1
sv_daysbeforedelete 31
sv_sqltablename "war3users"
sv_save_end_round 1


Now to the problem:
I recently moved my server to a provider that furnishes a mysql db with the server. I converted my old vault using Gessu's tool with no problem. When I join the server it shows all my xp and works no problem. I have been getting complaints about xp getting reset on map change so for an experiment I joined the server and picked a race that i have no xp in. I played a few rounds and then left the server and came back. When I was asked to choose a race the xp was showing up, BUT when I chose the race then it showed a 0 xp. I have checked the db and it is saving everyones xp because the file is getting bigger and bigger everyday but when they choose race on next map it is gone even though it is in the db. The exception is people who already had xp that was converted from the vault. They have their xp that was converted, I dont think that it is increasing though.

Thanks,

Posted: Sat Dec 10, 2005 12:12 pm
by Geesu
Can you find the records in your database that pertain to your steam id ?

Posted: Sat Dec 10, 2005 12:33 pm
by cacantre
Yes all the steam ids as well as names are in the db.

Posted: Sat Dec 10, 2005 2:52 pm
by erik2k3
well... sounds to me like the user / pw are not correct ... or the user u are connecting to the db has not the right permissions ?

Posted: Sat Dec 10, 2005 6:01 pm
by cacantre
They are correct.

Posted: Sat Dec 10, 2005 7:50 pm
by Krazy
Is the mysql server on the same server your game server is running on because the FT_sql_host would have a different ip then. Also I would double check your info because sometimes you type something wrong.

Posted: Sat Dec 10, 2005 8:15 pm
by cacantre
Yes it is on the same server and it is reading and writing to the db. The problem is with newly saved xp it does not properly retrieve it on the next map. ie. When you are asked to pick a race when you first join you see your xp, but after to pick the race the xp in the bottom left of the screen says 0 xp. If your xp was in the vault i converted it all shows up no prob but it never grows even though it is contantly saved. The db has grown from 700k to 5000k in 3 weeks, so it is saving at the end of the round like it is suppose too but if your disconnect and come back its gone as far as the client is concerned even though it is in the db.

Posted: Sun Dec 11, 2005 11:37 am
by Geesu
Does the log file mention losing a connection to the database? I don't know why it would...

Posted: Sun Dec 11, 2005 2:10 pm
by cacantre
No, i see nothing in the log files. I use other plugins that use the db and they seem to work properly.

As another test, I created a fresh table with no xp entries. I played for a little while and had 199 xp when map changed then when the next map came up it showed 199xp next to the race but when I chose the race my xp was 50. Any ideas?

Posted: Sun Dec 11, 2005 6:35 pm
by cacantre
I think i have it working now. I let Geesu's tool create the table rather than just populating it and it seems to work now. I have no idea what it is doing that i did not do but it seems to work now.