Raised This Month: $ Target: $400
 0% 

Mysql Problems, Reseting.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-11-2015 , 18:44   Re: Mysql Problems, Reseting.
Reply With Quote #8

client_disconnect() is useful, I just try to avoid calling functions on players there. If it's data that is stored in variables then it's fine to do the actual save procedure at disconnect. In your case, I would store each players steam id in a global array of strings (retrieve at client_authorized), this will save you a native call @ disconnect as well. I just noticed that you are already retrieving authid into a global array at authorized and you even have a comment saying it will be used at disconnect for safe saving. I'm guessing you copied the code from somewhere?


PHP Code:
public client_authorized(Id

    
get_user_authid(Idg_Steam[Id], charsmax(g_Steam[])) // Lets get SteamID just once. Safe for client_disconnect saving  

//...

public Save_PlayerLevel(id)
{
    static 
szAuthId[33];
    
get_user_authid(idszAuthId32); 
I would get an application that can view your tables to make sure all of the data looks ok.

For your SQL, I would name the table something different than one of the fields. You are using a table named Level while having a field named Level. Maybe name your table 'tblLevels'?
__________________

Last edited by Bugsy; 05-11-2015 at 18:44.
Bugsy is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode