View Single Post
Sobuno
Member
Join Date: Aug 2009
Old 12-29-2009 , 13:38   Re: [TF2 Stats] With Web Ranking and Item Logger [v6.0/6.5.2]
Reply With Quote #250

The error mentioned by Lob on page 23 is likely the reason as to why new players are not registered. The error will only appear on servers using SQLite, as mySQL databases are handled differently in the code

THE FOLLOWING IS UNTESTED:

To fix it (For those who know how to compile the plugin; for the rest, I've attached a compiled version of the plugin to this post that just needs to be uploaded to the server):

Go to line 2329.
Replace:
Code:
Format(buffer, sizeof(buffer), "INSERT INTO Player VALUES('%s','%s',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);", ClientSteamID,clientname )
with:
Code:
Format(buffer, sizeof(buffer), "INSERT INTO Player VALUES('%s','%s',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);", ClientSteamID,clientname )
Compile the file and upload it

The only difference between the two pieces of code is that I have added values for the 9 fields that were missing (Zeroes). These are not needed in mySQL as it has its default values set to 0 (I have no idea if this is possible in SQLite or not)

Last edited by psychonic; 12-29-2009 at 16:51. Reason: No need to post smx for sp that will compile o nthe forum
Sobuno is offline