C:\Users\Test\Desktop\roleplay.pwn(8228) : error 075: input line too long (after substitutions) C:\Users\Test\Desktop\roleplay.pwn(8229) : error 037: invalid string (possibly non-terminated string) C:\Users\Test\Desktop\roleplay.pwn(8229) : error 017: undefined symbol "UPDATE" C:\Users\Test\Desktop\roleplay.pwn(8229) : error 029: invalid expression, assumed zero C:\Users\Test\Desktop\roleplay.pwn(8229) : fatal error 107: too many error messages on one line
format(query, sizeof(query), "UPDATE `companies` SET `companyName` = '%s', `companyColor` = '%d', `companyType` = '%d', `companyRanks` = '%d', `companyInformationX` = '%.4f', `companyInformationY` = '%.4f', `companyInformationZ` = '%.4f', `companyInformationInt` = '%d', `companyInformationWorld` = '%d', `companyPurchaseX` = '%.4f', `companyPurchaseY` = '%.4f', `companyPurchaseZ` = '%.4f', `companyPurchaseInt` = '%d', `companyPurchaseWorld` = '%d', `SpawnX` = '%f', `SpawnY` = '%f', `SpawnZ` = '%f', `SpawnInterior` = '%d', `SpawnVW` = '%d'", SQL_ReturnEscaped(CompanyData[companyid][companyName]), CompanyData[companyid][companyColor], CompanyData[companyid][companyType], CompanyData[companyid][companyRanks], CompanyData[companyid][companyInformationPos][0], CompanyData[companyid][companyInformationPos][1], CompanyData[companyid][companyInformationPos][2], CompanyData[companyid][companyInformationInt], CompanyData[companyid][companyInformationWorld], CompanyData[companyid][companyPurchasePos][0], CompanyData[companyid][companyPurchasePos][1], CompanyData[companyid][companyPurchasePos][2], CompanyData[companyid][companyPurchaseInt], CompanyData[companyid][companyPurchaseWorld],
format(query,sizeof query,"UPDATE `companies` SET `companyName`='%s',`companyColor`=%d,`companyType`=%d,`companyRanks`=%d,`companyInformationX`=%.4f,",
SQL_RetrunEscaped(CompanyData[companyid][companyName]),CompanyData[companyid][companyColor],CompanyData[companyid][companyType],CompanyData[companyid][companyRanks],
CompanyData[companyid][companyInformationPos][0]);
format(query,sizeof query,"%s`companyInformationY`=%.4f,`companyInformationZ`=%.4f,//and so on",
query,CompanyData[companyid][CompanyInformationPos][1]
Hello!
You have to do that like this: PHP код:
- Mencent |
C:\Users\Test\Desktop\roleplay.pwn(8229 -- 8254) : error 001: expected token: ",", but found ";"
Company_Save(companyid) { format(query, sizeof(query), "UPDATE `companies` SET `companyName` = '%s', `companyColor` = '%d', `companyType` = '%d', `companyRanks` = '%d',", SQL_ReturnEscaped(CompanyData[companyid][companyName]), CompanyData[companyid][companyColor], CompanyData[companyid][companyType], CompanyData[companyid][companyRanks], format(query, sizeof(query), "%s `companyInformationX` = '%.4f', `companyInformationY` = '%.4f', `companyInformationZ` = '%.4f', \ `companyInformationInt` = '%d', `companyInformationWorld` = '%d',", CompanyData[companyid][companyInformationPos][0], CompanyData[companyid][companyInformationPos][1], CompanyData[companyid][companyInformationPos][2], CompanyData[companyid][companyInformationInt], CompanyData[companyid][companyInformationWorld], format(query, sizeof(query), "%s `companyPurchaseX` = '%.4f', `companyPurchaseY` = '%.4f', `companyPurchaseZ` = '%.4f', \ `companyPurchaseInt` = '%d', `companyPurchaseWorld` = '%d',", CompanyData[companyid][companyPurchasePos][0], CompanyData[companyid][companyPurchasePos][1], CompanyData[companyid][companyPurchasePos][2], CompanyData[companyid][companyPurchaseInt], CompanyData[companyid][companyPurchaseWorld], format(query, sizeof(query), "%s `SpawnX` = '%f', `SpawnY` = '%f', `SpawnZ` = '%f', `SpawnInterior` = '%d', `SpawnVW` = '%d',", CompanyData[companyid][SpawnX], CompanyData[companyid][SpawnY], CompanyData[companyid][SpawnZ], CompanyData[companyid][SpawnInterior], CompanyData[companyid][SpawnVW] );