Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Mysql Saving data problem

$
0
0
Hello, everyone. I've been trying from a while to save the player data upon the player leaves the server, I've been trying to script it from a long time but I keep on getting error in one line ( marked it on the code provided below ). Can anyone help me out to resolve this issue and explain of where I went wrong? ( Plug version is R39-9 ).

PHP Code:

    new Query[900];
    
GetPlayerName(playeridQueryMAX_PLAYER_NAME);
    
mysql_real_escape_string(QueryQuery);
    
format(Querysizeof(Query), "UPDATE `accounts` SET `Admin` = '%d', `VIP` = '%d', `Money` = '%d', `Kills` = '%d', `Deaths` = '%d', `Score` = '%d' WHERE `Name` = '%s'",
                                  
Player[playerid][Admin],
                                  
Player[playerid][VIP],
                                  
Player[playerid][Money],
                                  
Player[playerid][Kills],
                                  
Player[playerid][Deaths],
                                  
Player[playerid][Score],
                                  
Query);
    
mysql_query(Query);
    return 
1;



Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>