mysql_log error #1064
#1

Всем привет. Нашел проблему, и похоже она в этом коде:

PHP код:
public LoadProperty()
{
    static 
rowsfields;
    
cache_get_data(rowsfields);
    new 
temp[120],i=0;
    if(
rows)
    {
        for(new 
he 0;he MAX_HOUSEhe++)
        {
            
cache_get_row(he0temp), HouseInfo[he][hID] = strval(temp);
            
cache_get_row(he1temp), HouseInfo[he][hEntrancex] = floatstr(temp);
            
cache_get_row(he2temp), HouseInfo[he][hEntrancey] = floatstr(temp);
            
cache_get_row(he3temp), HouseInfo[he][hEntrancez] = floatstr(temp);
            
cache_get_row(he4temp), HouseInfo[he][hExitx] = floatstr(temp);
            
cache_get_row(he5temp), HouseInfo[he][hExity] = floatstr(temp);
            
cache_get_row(he6temp), HouseInfo[he][hExitz] = floatstr(temp);
            
cache_get_row(he7temp), strmid(HouseInfo[he][hOwner], temp0strlen(temp), 255);
            
cache_get_row(he8temp), HouseInfo[he][hValue] = strval(temp);
            
cache_get_row(he9temp), HouseInfo[he][hHel] = strval(temp);
            
cache_get_row(he10temp), HouseInfo[he][hInt] = strval(temp);
            
cache_get_row(he11temp), HouseInfo[he][hLock] = strval(temp);
            
cache_get_row(he12temp), HouseInfo[he][hOwned] = strval(temp);
            
cache_get_row(he13temp), HouseInfo[he][hTakings] = strval(temp);
            
cache_get_row(he14temp), HouseInfo[he][hKlass] = strval(temp);
            
cache_get_row(he15temp), HouseInfo[he][hCarx] = floatstr(temp);
            
cache_get_row(he16temp), HouseInfo[he][hCary] = floatstr(temp);
            
cache_get_row(he17temp), HouseInfo[he][hCarz] = floatstr(temp);
            
cache_get_row(he18temp), HouseInfo[he][hCarc] = floatstr(temp);
            
cache_get_row(he19temp), HouseInfo[he][hStyle] = strval(temp);
            
cache_get_row(he20temp), HouseInfo[he][hSafe] = strval(temp);
            
cache_get_row(he21temp), HouseInfo[he][hMoneySafe] = strval(temp);
            
cache_get_row(he22temp), HouseInfo[he][hPSafe1] = floatstr(temp);
            
cache_get_row(he23temp), HouseInfo[he][hPSafe2] = floatstr(temp);
            
cache_get_row(he24temp), HouseInfo[he][hPSafe3] = floatstr(temp);
            
cache_get_row(he25temp), HouseInfo[he][hSPass] = strval(temp);
            
cache_get_row(he26temp), HouseInfo[he][hDeagle] = strval(temp);
            
cache_get_row(he27temp), HouseInfo[he][hShotgun] = strval(temp);
            
cache_get_row(he28temp), HouseInfo[he][hM4] = strval(temp);
            
cache_get_row(he29temp), HouseInfo[he][hAK47] = strval(temp);
            
cache_get_row(he30temp), HouseInfo[he][hShkaf] = strval(temp);
            
cache_get_row(he31temp), HouseInfo[he][hSkin] = strval(temp);
            
cache_get_row(he32temp), strmid(HouseInfo[he][hOwner2], temp0strlen(temp), 255);
            
i++;
            if(
HouseInfo[he][hOwned] == 0)
            {
                
HouseInfo[he][hPickup] = CreatePickup(127323HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez],-1);
                
HouseInfo[he][hMIcon] = CreateDynamicMapIcon(HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez], 31, -10, -1, -150.0);
            }
            if(
HouseInfo[he][hOwned] == 1)
            {
                
HouseInfo[he][hPickup] = CreatePickup(127223HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez],-1);
                
HouseInfo[he][hMIcon] = CreateDynamicMapIcon(HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez], 32, -10, -1, -150.0);
            }
            if(
HouseInfo[he][hSafe] == 1)
            {
                switch(
HouseInfo[he][hKlass])
                {
                case 
2SObject[he] = CreateDynamicObject(233236.115215,1342.832275,1084.2154540.000000,0.000000,-90.099990,he+50,HouseInfo[he][hInt]); //C
                
case 0SObject[he] = CreateDynamicObject(23322266.930908,-1137.543701,1051.0802000.000000,0.000000,179.199951,he+50,HouseInfo[he][hInt]);//N
                
case 4SObject[he] = CreateDynamicObject(2332490.324768,1416.366577,1084.7155760.000000,0.000000,0.000000,he+50,HouseInfo[he][hInt]); //A
                
case 1SObject[he] = CreateDynamicObject(2332225.089248,1247.752807,1082.7402340.000000,0.000000,0.000000,he+50,HouseInfo[he][hInt]);//D
                
case 3SObject[he] = CreateDynamicObject(2332, -278.448577,1455.937133,1084.8669430.000000,0.000000,90.999931,he+50,HouseInfo[he][hInt]); //B
                
case 5SObject[he] = CreateDynamicObject(23322339.744873,-1142.837158,1054.484008, -0.100000,0.000000,-179.800033,he+50,HouseInfo[he][hInt]);//V
                
}
            }
            switch(
HouseInfo[he][hKlass])
            {
            case 
0: { HouseInfo[he][hInt] = 10HouseInfo[he][hExitx] = 2261.3103HouseInfo[he][hExity]= -1136.4467HouseInfo[he][hExitz] =1050.6328; }
            case 
1: { HouseInfo[he][hInt] = 2HouseInfo[he][hExitx] = 225.9761HouseInfo[he][hExity]= 1239.9126HouseInfo[he][hExitz] =1082.1406; }
            case 
2: { HouseInfo[he][hInt] = 10HouseInfo[he][hExitx] = 23.8334HouseInfo[he][hExity]= 1340.4812HouseInfo[he][hExitz] =1084.3750; }
            case 
3: { HouseInfo[he][hInt] = 4HouseInfo[he][hExitx] = -261.9759HouseInfo[he][hExity]= 1456.8844HouseInfo[he][hExitz] = 1084.3672; }
            case 
4: { HouseInfo[he][hInt] = 2HouseInfo[he][hExitx] = 491.0190HouseInfo[he][hExity]= 1399.0691HouseInfo[he][hExitz] =1080.2578; }
            case 
5: { HouseInfo[he][hInt]=12HouseInfo[he][hExitx]=2324.5974HouseInfo[he][hExity]=-1149.5468HouseInfo[he][hExitz]=1050.7101; }
            }
            
BuyHouse(he);
        }
    }
    return 
true;



PHP код:
[14:00:04] [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 ''' at line 1
[14:00:12] [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 ''43' at line 1
[15:00:03] [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 ''' at line 1
[15:00:07] [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 ''43' at line 1
[15:36:33] [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 ''15' at line 1
[15:46:21] [ERRORCMySQLQuery::Execute[] - (error #1054) Unknown column 'Andrey_Praic' in 'where clause'
[16:00:03] [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 ''' at line 1
[16:00:03] [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 ''15' at line 1
[16:00:07] [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 ''43' at line 1
[17:00:03] [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 ''' at line 1
[17:00:04] [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 ''15' at line 1
[17:00:09] [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 ''43' at line 1
[17:00:14] [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 ''60' at line 1
[18:00:03] [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 ''' at line 1
[18:00:03] [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 ''15' at line 1
[18:00:09] [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 ''43' at line 1
[18:00:13] [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 ''60' at line 1
[18:06:36] [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 ''60' at line 1
[18:36:16] [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 '' at line 1
[18:36:48] [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 '' at line 1
[18:52:51] [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 '' at line 1
[18:54:56] [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 '' at line 1
[19:00:04] [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 '' at line 1 


PHP код:
stock SaveHouse(houseid)
{
    new 
update[700];
    
update "UPDATE `house` SET ";
    
acc_float_strcat(updatesizeof(update), "hEntrancex"HouseInfo[houseid][hEntrancex]);
    
acc_float_strcat(updatesizeof(update), "hEntrancey"HouseInfo[houseid][hEntrancey]);
    
acc_float_strcat(updatesizeof(update), "hEntrancez"HouseInfo[houseid][hEntrancez]);
    
acc_float_strcat(updatesizeof(update), "hExitx"HouseInfo[houseid][hExitx]);
    
acc_float_strcat(updatesizeof(update), "hExity"HouseInfo[houseid][hExity]);
    
acc_float_strcat(updatesizeof(update), "hExitz"HouseInfo[houseid][hExitz]);
    
acc_str_strcat(updatesizeof(update), "hOwner"HouseInfo[houseid][hOwner]);
    
acc_str_strcat(updatesizeof(update), "hOwner2"HouseInfo[houseid][hOwner2]);
    
acc_int_strcat(updatesizeof(update), "hValue"HouseInfo[houseid][hValue]);
    
acc_int_strcat(updatesizeof(update), "hHel"HouseInfo[houseid][hHel]);
    
acc_int_strcat(updatesizeof(update), "hInt"HouseInfo[houseid][hInt]);
    
acc_int_strcat(updatesizeof(update), "hLock"HouseInfo[houseid][hLock]);
    
acc_int_strcat(updatesizeof(update), "hOwned"HouseInfo[houseid][hOwned]);
    
acc_int_strcat(updatesizeof(update), "hTakings"HouseInfo[houseid][hTakings]);
    
acc_int_strcat(updatesizeof(update), "hKlass"HouseInfo[houseid][hKlass]);
    
acc_float_strcat(updatesizeof(update), "hCarx"HouseInfo[houseid][hCarx]);
    
acc_float_strcat(updatesizeof(update), "hCary"HouseInfo[houseid][hCary]);
    
acc_float_strcat(updatesizeof(update), "hCarz"HouseInfo[houseid][hCarz]);
    
acc_float_strcat(updatesizeof(update), "hCarc"HouseInfo[houseid][hCarc]);
    
acc_int_strcat(updatesizeof(update), "hStyle"HouseInfo[houseid][hStyle]);
    
acc_int_strcat(updatesizeof(update), "hSafe"HouseInfo[houseid][hSafe]);
    
acc_int_strcat(updatesizeof(update), "hMoneySafe"HouseInfo[houseid][hMoneySafe]);
    
acc_float_strcat(updatesizeof(update), "hPSafe1"HouseInfo[houseid][hPSafe1]);
    
acc_float_strcat(updatesizeof(update), "hPSafe2"HouseInfo[houseid][hPSafe2]);
    
acc_float_strcat(updatesizeof(update), "hPSafe3"HouseInfo[houseid][hPSafe3]);
    
acc_int_strcat(updatesizeof(update), "hSPass"HouseInfo[houseid][hSPass]);
    
acc_int_strcat(updatesizeof(update), "hDeagle"HouseInfo[houseid][hDeagle]);
    
acc_int_strcat(updatesizeof(update), "hShotgun"HouseInfo[houseid][hShotgun]);
    
acc_int_strcat(updatesizeof(update), "hM4"HouseInfo[houseid][hM4]);
    
acc_int_strcat(updatesizeof(update), "hAK47"HouseInfo[houseid][hAK47]);
    
acc_int_strcat(updatesizeof(update), "hShkaf"HouseInfo[houseid][hShkaf]);
    
acc_int_strcat(updatesizeof(update), "hSkin"HouseInfo[houseid][hSkin]);
    
strdel(updatestrlen(update)-1strlen(update));
    
format(stringer,sizeof(stringer)," WHERE `hID` = '%d'",houseid);
    
strcat(updatestringer);
    
mysql_function_query(dbHandleupdatefalse"""");



В чём может быть дело?
Reply
#2

вставь в мод

PHP код:
public OnQueryError(erroriderror[], callback[], query[], connectionHandle)
{
    
printf("MySQL ERROR [%d]: %s. Query: %s",errorid,error,query);
    return 
1;

скомпилируй, запусти.
Reply
#3

Quote:
Originally Posted by nikita86826
Посмотреть сообщение
вставь в мод

PHP код:
public OnQueryError(erroriderror[], callback[], query[], connectionHandle)
{
    
printf("MySQL ERROR [%d]: %s. Query: %s",errorid,error,query);
    return 
1;

скомпилируй, запусти.
error 021: symbol already defined: "OnQueryError"

R39-3
Reply
#4

Значит есть уже такое,у меня было что то подобное,точно помню слово "syntax" решил увеличением числа в скобках,не знаю та ли эта ошибка.
Reply
#5

У тебя ошибка в запросе, судя по тексту лишняя ковычка.
Reply
#6

Исправил проблему следующим образом
PHP код:
format(stringer,sizeof(stringer)," WHERE `hID` = '%d'"HouseInfo[houseid][hID]); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)