MySQL Problem
#1

../include/g_mysql.inc(42 : warning 235: public function lacks forward declaration (symbol "OnQueryError")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.

please help me to fix this Thanks
Reply
#2

please help ASAP
Reply
#3

Add this above your function,
PHP код:
forward OnQueryError(); 
Reply
#4

i do the forward OnQueryError () ; but this comes up
../include/g_mysql.inc(429) : error 001: expected token: ";", but found "{"
../include/g_mysql.inc(432) : error 021: symbol already defined: "Log"
../include/g_mysql.inc(434) : error 010: invalid function or declaration
../include/g_mysql.inc(436) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#5

Show me your InQueryError function.
Reply
#6

Quote:
Originally Posted by Bogdan1992
Посмотреть сообщение
Show me your InQueryError function.
PHP код:
forward OnQueryError(erroriderror[], resultidextraidcallback[], query[], connectionHandle)
{
    
printf("[MySQL] Query Error - (Thread: %d) (ExtraID: %d) (ErrorID: %d)"resultidextraiderrorid);
    print(
"[MySQL] Check /logs/querydump.log to review the query that threw the error.");
    
Log("logs/querydump.log"query);
    
    if(
resultid != -1)
    {
        if(
errorid == 2013 || errorid == 2014 || errorid == 2006 || errorid == 2027 || errorid == 2055)
        {
            print(
"[MySQL] Connection Error Detected in Threaded Query, Attempting to Re-send Query.");
            
mysql_query(queryresultidextraidMainPipeline);
        }
    }

Reply
#7

pawn Код:
forward OnQueryError(errorid, error[], resultid, extraid, callback[], query[], connectionHandle);
public OnQueryError(errorid, error[], resultid, extraid, callback[], query[], connectionHandle)
{
    printf("[MySQL] Query Error - (Thread: %d) (ExtraID: %d) (ErrorID: %d)", resultid, extraid, errorid);
    print("[MySQL] Check /logs/querydump.log to review the query that threw the error.");
    Log("logs/querydump.log", query);
     
    if(resultid != -1)
    {
        if(errorid == 2013 || errorid == 2014 || errorid == 2006 || errorid == 2027 || errorid == 2055)
        {
            print("[MySQL] Connection Error Detected in Threaded Query, Attempting to Re-send Query.");
            mysql_query(query, resultid, extraid, MainPipeline);
        }
    }
    return 1;
}
Give that a go :P
Reply
#8

Thanks. Work now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)