[debug]Crash server
#1

Переписываю сохранение аккаунта на mysql, использую плагин r34, но аккаунт не сохраняется а в логах пишется:
PHP код:
[12:29:38] [DEBUGmysql_tquery connection1query"UPDATE `accounts` SET `Level` = '1', `AdminLevel` = '0', `Helper"callback"(null)"format"(null)"
[12:29:38] [DEBUGCMySQLQuery::CMySQLQuery() - constructor called
[12:29:38] [DEBUGmysql_tquery scheduling query "UPDATE `accounts` SET `Level` = '1', `AdminLevel` = '0', `HelperLevel` = '0', `DonateRank` = '0', `UpgradePoints` = '0', `ConnectedTime` = '0', `Registered` = '1', `Sex` = '1', `Age` = '0', `Origin` = '0', WHERE `NickName` = 'Vasya_Pupki"..
[
12:29:38] [DEBUGCMySQLQuery::Execute[()] - starting query execution
[12:29:38] [ERRORCMySQLQuery::Execute[()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `NickName` = 'Vasya_Pupki' at line 1
[12:29:38] [DEBUGCMySQLQuery::Execute[()] - error will be triggered in OnQueryError
[12:29:38] [DEBUGCMySQLQuery::Execute[()] - data being passed to ProcessCallbacks()
[
12:29:38] [DEBUGCMySQLQuery::~CMySQLQuery() - deconstructor called 
Вот код:
PHP код:
stock SaveAccount1(playerid)
{
    new 
heap heapspace();
    
printf("SaveAccount1() STK %d"heap);
    new 
string[32]; new query[1024];
    new 
PlayerName[24];
    
mysql_real_escape_string(PlayerInfo[playerid][pName], PlayerName);
    
format(string,sizeof(string),"UPDATE `accounts` SET "),strcat(query,string);
    
format(string,sizeof(string),"`Level` = '%i', ",PlayerInfo[playerid][pLevel]),strcat(query,string);
    
format(string,sizeof(string),"`AdminLevel` = '%i', ",PlayerInfo[playerid][pAdmin]),strcat(query,string);
    
format(string,sizeof(string),"`HelperLevel` = '%i', ",PlayerInfo[playerid][pHelper]),strcat(query,string);
    
format(string,sizeof(string),"`DonateRank` = '%i', ",PlayerInfo[playerid][pDonateRank]),strcat(query,string);
    
format(string,sizeof(string),"`UpgradePoints` = '%i', ",PlayerInfo[playerid][pUpgrade]),strcat(query,string);
    
format(string,sizeof(string),"`ConnectedTime` = '%i', ",PlayerInfo[playerid][pConnectTime]),strcat(query,string);
    
format(string,sizeof(string),"`Registered` = '%i', ",PlayerInfo[playerid][pReg]),strcat(query,string);
    
format(string,sizeof(string),"`Sex` = '%i', ",PlayerInfo[playerid][pSex]),strcat(query,string);
    
format(string,sizeof(string),"`Age` = '%i', ",PlayerInfo[playerid][pAge]),strcat(query,string);
    
format(string,sizeof(string),"`Origin` = '%i', ",PlayerInfo[playerid][pOrigin]),strcat(query,string);
    
format(string,sizeof(string),"WHERE `NickName` = '%s'",PlayerName),strcat(query,string);
    
mysql_function_query(dbHandle,query,false,"","");
    
printf("SaveAccount1() STK %d (%d LOSS)"heapspace(), (heap heapspace()));
    return 
1;

Reply


Messages In This Thread
[debug]MySQL R34 Сохранение аккаунта - by Mr.4o-4o - 02.12.2013, 09:28
Re: [debug]Crash server - by Mr.4o-4o - 05.12.2013, 05:30
Re: [debug]Crash server - by ea8de1 - 05.12.2013, 06:12
Re: [debug]Crash server - by Stepashka - 05.12.2013, 06:23
Re: [debug]Crash server - by Mr.4o-4o - 05.12.2013, 11:18
Re: [debug]Crash server - by Mr.4o-4o - 05.12.2013, 11:36
Re: [debug]Crash server - by Jon_De - 05.12.2013, 11:50
Re: [debug]Crash server - by Mr.4o-4o - 05.12.2013, 12:03
Re: [debug]Crash server - by Jon_De - 05.12.2013, 12:14

Forum Jump:


Users browsing this thread: 2 Guest(s)