MySQL Problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL Problem (
/showthread.php?tid=313914)
MySQL Problem -
sampmark05 - 27.01.2012
../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
Re: MySQL Problem -
sampmark05 - 28.01.2012
please help ASAP
Re: MySQL Problem -
Bogdan1992 - 28.01.2012
Add this above your function,
PHP код:
forward OnQueryError();
Re: MySQL Problem -
sampmark05 - 29.01.2012
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.
Re: MySQL Problem -
Bogdan1992 - 29.01.2012
Show me your InQueryError function.
Re: MySQL Problem -
sampmark05 - 30.01.2012
Quote:
Originally Posted by Bogdan1992
Show me your InQueryError function.
|
PHP код:
forward 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);
}
}
}
Re: MySQL Problem -
[HiC]TheKiller - 30.01.2012
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
Re: MySQL Problem -
sampmark05 - 30.01.2012
Thanks. Work now.