28.08.2012, 18:55
Hello Guys.I recently receive a script thats mysql based.How can i compile it?When i compile i receive MySql errors.
(3028) : error 025: function heading differs from prototype
(3030) : error 025: function heading differs from prototype
(3037) : error 001: expected token: ";", but found ")"
(3037) : error 029: invalid expression, assumed zero
cache_get_field_content( row, const field_name[], dest[] [, connectionHandle = 1] )
Show us your code and I will fix it
This forum requires that you wait 120 seconds between posts. Please try again in 48 seconds. |
// Callbacks
forward OnQueryFinish(resultid, extraid, handleid);
public OnQueryFinish(resultid, extraid, handleid)
{
new rows, fields;
if(resultid != SENDDATA_THREAD) {
if(extraid != INVALID_PLAYER_ID) {
if(g_arrQueryHandle{extraid} != -1 && g_arrQueryHandle{extraid} != handleid) return 0;
}
cache_get_data(rows, fields);
}
switch(resultid)
{
case LOADMOTDDATA_THREAD:
{
for(new i;i < rows;i++)
{
new szResult[32];
cache_get_field_content(i, "gMOTD", GlobalMOTD, MainPipeline);
cache_get_field_content(i, "aMOTD", AdminMOTD, MainPipeline);
cache_get_field_content(i, "vMOTD", VIPMOTD, MainPipeline);
cache_get_field_content(i, "cMOTD", CAMOTD, MainPipeline);
cache_get_field_content(i, "pMOTD", pMOTD, MainPipeline);
cache_get_field_content(i, "ShopTechPay", szResult, MainPipeline); ShopTechPay = floatstr(szResult);
break;
}
}
case LOADUSERDATA_THREAD:
{
if(IsPlayerConnected(extraid))
{
new szField[MAX_PLAYER_NAME], szResult[64];
for(new row;row < rows;row++)
{
cache_get_field_content(row, "Username", szField, MainPipeline);
if(strcmp(szField, GetPlayerNameExt(extraid), true) != 0)
{
return 1;
}
cache_get_field_content(row, "id", szResult, MainPipeline); PlayerInfo[extraid][pId] = strval(szResult);
cache_get_field_content(row, "Online", szResult, MainPipeline); PlayerInfo[extraid][pOnline] = strval(szResult);