29.03.2015, 11:13
Всем привет. Нашел проблему, и похоже она в этом коде:
В чём может быть дело?
PHP код:
public LoadProperty()
{
static rows, fields;
cache_get_data(rows, fields);
new temp[120],i=0;
if(rows)
{
for(new he = 0;he < MAX_HOUSE; he++)
{
cache_get_row(he, 0, temp), HouseInfo[he][hID] = strval(temp);
cache_get_row(he, 1, temp), HouseInfo[he][hEntrancex] = floatstr(temp);
cache_get_row(he, 2, temp), HouseInfo[he][hEntrancey] = floatstr(temp);
cache_get_row(he, 3, temp), HouseInfo[he][hEntrancez] = floatstr(temp);
cache_get_row(he, 4, temp), HouseInfo[he][hExitx] = floatstr(temp);
cache_get_row(he, 5, temp), HouseInfo[he][hExity] = floatstr(temp);
cache_get_row(he, 6, temp), HouseInfo[he][hExitz] = floatstr(temp);
cache_get_row(he, 7, temp), strmid(HouseInfo[he][hOwner], temp, 0, strlen(temp), 255);
cache_get_row(he, 8, temp), HouseInfo[he][hValue] = strval(temp);
cache_get_row(he, 9, temp), HouseInfo[he][hHel] = strval(temp);
cache_get_row(he, 10, temp), HouseInfo[he][hInt] = strval(temp);
cache_get_row(he, 11, temp), HouseInfo[he][hLock] = strval(temp);
cache_get_row(he, 12, temp), HouseInfo[he][hOwned] = strval(temp);
cache_get_row(he, 13, temp), HouseInfo[he][hTakings] = strval(temp);
cache_get_row(he, 14, temp), HouseInfo[he][hKlass] = strval(temp);
cache_get_row(he, 15, temp), HouseInfo[he][hCarx] = floatstr(temp);
cache_get_row(he, 16, temp), HouseInfo[he][hCary] = floatstr(temp);
cache_get_row(he, 17, temp), HouseInfo[he][hCarz] = floatstr(temp);
cache_get_row(he, 18, temp), HouseInfo[he][hCarc] = floatstr(temp);
cache_get_row(he, 19, temp), HouseInfo[he][hStyle] = strval(temp);
cache_get_row(he, 20, temp), HouseInfo[he][hSafe] = strval(temp);
cache_get_row(he, 21, temp), HouseInfo[he][hMoneySafe] = strval(temp);
cache_get_row(he, 22, temp), HouseInfo[he][hPSafe1] = floatstr(temp);
cache_get_row(he, 23, temp), HouseInfo[he][hPSafe2] = floatstr(temp);
cache_get_row(he, 24, temp), HouseInfo[he][hPSafe3] = floatstr(temp);
cache_get_row(he, 25, temp), HouseInfo[he][hSPass] = strval(temp);
cache_get_row(he, 26, temp), HouseInfo[he][hDeagle] = strval(temp);
cache_get_row(he, 27, temp), HouseInfo[he][hShotgun] = strval(temp);
cache_get_row(he, 28, temp), HouseInfo[he][hM4] = strval(temp);
cache_get_row(he, 29, temp), HouseInfo[he][hAK47] = strval(temp);
cache_get_row(he, 30, temp), HouseInfo[he][hShkaf] = strval(temp);
cache_get_row(he, 31, temp), HouseInfo[he][hSkin] = strval(temp);
cache_get_row(he, 32, temp), strmid(HouseInfo[he][hOwner2], temp, 0, strlen(temp), 255);
i++;
if(HouseInfo[he][hOwned] == 0)
{
HouseInfo[he][hPickup] = CreatePickup(1273, 23, HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez],-1);
HouseInfo[he][hMIcon] = CreateDynamicMapIcon(HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez], 31, -1, 0, -1, -1, 50.0);
}
if(HouseInfo[he][hOwned] == 1)
{
HouseInfo[he][hPickup] = CreatePickup(1272, 23, HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez],-1);
HouseInfo[he][hMIcon] = CreateDynamicMapIcon(HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez], 32, -1, 0, -1, -1, 50.0);
}
if(HouseInfo[he][hSafe] == 1)
{
switch(HouseInfo[he][hKlass])
{
case 2: SObject[he] = CreateDynamicObject(2332, 36.115215,1342.832275,1084.215454, 0.000000,0.000000,-90.099990,he+50,HouseInfo[he][hInt]); //C
case 0: SObject[he] = CreateDynamicObject(2332, 2266.930908,-1137.543701,1051.080200, 0.000000,0.000000,179.199951,he+50,HouseInfo[he][hInt]);//N
case 4: SObject[he] = CreateDynamicObject(2332, 490.324768,1416.366577,1084.715576, 0.000000,0.000000,0.000000,he+50,HouseInfo[he][hInt]); //A
case 1: SObject[he] = CreateDynamicObject(2332, 225.089248,1247.752807,1082.740234, 0.000000,0.000000,0.000000,he+50,HouseInfo[he][hInt]);//D
case 3: SObject[he] = CreateDynamicObject(2332, -278.448577,1455.937133,1084.866943, 0.000000,0.000000,90.999931,he+50,HouseInfo[he][hInt]); //B
case 5: SObject[he] = CreateDynamicObject(2332, 2339.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] = 10; HouseInfo[he][hExitx] = 2261.3103; HouseInfo[he][hExity]= -1136.4467; HouseInfo[he][hExitz] =1050.6328; }
case 1: { HouseInfo[he][hInt] = 2; HouseInfo[he][hExitx] = 225.9761; HouseInfo[he][hExity]= 1239.9126; HouseInfo[he][hExitz] =1082.1406; }
case 2: { HouseInfo[he][hInt] = 10; HouseInfo[he][hExitx] = 23.8334; HouseInfo[he][hExity]= 1340.4812; HouseInfo[he][hExitz] =1084.3750; }
case 3: { HouseInfo[he][hInt] = 4; HouseInfo[he][hExitx] = -261.9759; HouseInfo[he][hExity]= 1456.8844; HouseInfo[he][hExitz] = 1084.3672; }
case 4: { HouseInfo[he][hInt] = 2; HouseInfo[he][hExitx] = 491.0190; HouseInfo[he][hExity]= 1399.0691; HouseInfo[he][hExitz] =1080.2578; }
case 5: { HouseInfo[he][hInt]=12; HouseInfo[he][hExitx]=2324.5974; HouseInfo[he][hExity]=-1149.5468; HouseInfo[he][hExitz]=1050.7101; }
}
BuyHouse(he);
}
}
return true;
}
PHP код:
[14:00:04] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'Andrey_Praic' in 'where clause'
[16:00:03] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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] [ERROR] CMySQLQuery::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(update, sizeof(update), "hEntrancex", HouseInfo[houseid][hEntrancex]);
acc_float_strcat(update, sizeof(update), "hEntrancey", HouseInfo[houseid][hEntrancey]);
acc_float_strcat(update, sizeof(update), "hEntrancez", HouseInfo[houseid][hEntrancez]);
acc_float_strcat(update, sizeof(update), "hExitx", HouseInfo[houseid][hExitx]);
acc_float_strcat(update, sizeof(update), "hExity", HouseInfo[houseid][hExity]);
acc_float_strcat(update, sizeof(update), "hExitz", HouseInfo[houseid][hExitz]);
acc_str_strcat(update, sizeof(update), "hOwner", HouseInfo[houseid][hOwner]);
acc_str_strcat(update, sizeof(update), "hOwner2", HouseInfo[houseid][hOwner2]);
acc_int_strcat(update, sizeof(update), "hValue", HouseInfo[houseid][hValue]);
acc_int_strcat(update, sizeof(update), "hHel", HouseInfo[houseid][hHel]);
acc_int_strcat(update, sizeof(update), "hInt", HouseInfo[houseid][hInt]);
acc_int_strcat(update, sizeof(update), "hLock", HouseInfo[houseid][hLock]);
acc_int_strcat(update, sizeof(update), "hOwned", HouseInfo[houseid][hOwned]);
acc_int_strcat(update, sizeof(update), "hTakings", HouseInfo[houseid][hTakings]);
acc_int_strcat(update, sizeof(update), "hKlass", HouseInfo[houseid][hKlass]);
acc_float_strcat(update, sizeof(update), "hCarx", HouseInfo[houseid][hCarx]);
acc_float_strcat(update, sizeof(update), "hCary", HouseInfo[houseid][hCary]);
acc_float_strcat(update, sizeof(update), "hCarz", HouseInfo[houseid][hCarz]);
acc_float_strcat(update, sizeof(update), "hCarc", HouseInfo[houseid][hCarc]);
acc_int_strcat(update, sizeof(update), "hStyle", HouseInfo[houseid][hStyle]);
acc_int_strcat(update, sizeof(update), "hSafe", HouseInfo[houseid][hSafe]);
acc_int_strcat(update, sizeof(update), "hMoneySafe", HouseInfo[houseid][hMoneySafe]);
acc_float_strcat(update, sizeof(update), "hPSafe1", HouseInfo[houseid][hPSafe1]);
acc_float_strcat(update, sizeof(update), "hPSafe2", HouseInfo[houseid][hPSafe2]);
acc_float_strcat(update, sizeof(update), "hPSafe3", HouseInfo[houseid][hPSafe3]);
acc_int_strcat(update, sizeof(update), "hSPass", HouseInfo[houseid][hSPass]);
acc_int_strcat(update, sizeof(update), "hDeagle", HouseInfo[houseid][hDeagle]);
acc_int_strcat(update, sizeof(update), "hShotgun", HouseInfo[houseid][hShotgun]);
acc_int_strcat(update, sizeof(update), "hM4", HouseInfo[houseid][hM4]);
acc_int_strcat(update, sizeof(update), "hAK47", HouseInfo[houseid][hAK47]);
acc_int_strcat(update, sizeof(update), "hShkaf", HouseInfo[houseid][hShkaf]);
acc_int_strcat(update, sizeof(update), "hSkin", HouseInfo[houseid][hSkin]);
strdel(update, strlen(update)-1, strlen(update));
format(stringer,sizeof(stringer)," WHERE `hID` = '%d'",houseid);
strcat(update, stringer);
mysql_function_query(dbHandle, update, false, "", "");
}
В чём может быть дело?