MYSQL Error
#1

Hello, i had an old gamemode on my PC and i started to convert it from mysql R39 to MYSQL R41, everything was done and successful but i have a little issue, here it is:


PHP код:
error 025: function heading differs from prototype 
Code:

PHP код:
public OnQueryError(erroriderror[], callback[], query[], connectionHandle)
{
    foreach (new 
Player)
    {
        if (
PlayerData[i][pAdmin] >= && PlayerData[i][pExecute])
        {
            
PlayerData[i][pExecute] = 0;
            
Dialog_Show(iExecuteQueryDIALOG_STYLE_INPUT"Execute Query""Error: \"%s\"\n\nPlease specify the MySQL query to execute below:""Execute""Back"error);
        }
    }
     
printf("** [MySQL]: %s"error);
    
Log_Write("logs/mysql_log.txt""[%s] %s: %s"ReturnDate(), (callback[0]) ? (callback) : ("n/a"), error);
    return 
1;

PHP код:
public OnQueryError(erroriderror[], callback[], query[], connectionHandle
^ that is the line
Reply
#2

Did you search what functions/callback you should update when you change your MySQL version?
It took me 45 seconds to write "mysql samp r41" on ******, open the wiki, look for "OnQueryErro" and find out what's the problem.
Reply
#3

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Did you search what functions/callback you should update when you change your MySQL version?
It took me 45 seconds to write "mysql samp r41" on ******, open the wiki, look for "OnQueryErro" and find out what's the problem.
Yeah i did search the functions and callbacks, when i compiled the gamemode the first time it was R39 it had so many warnings and error because i was using the new version, i changed everything and only that error is left.
Reply
#4

This thread has your solution: https://sampforum.blast.hk/showthread.php?tid=620253

Quote:
Originally Posted by TommyB
Посмотреть сообщение
Replace OnQueryError with this. Works for me.

Код:
public OnQueryError(errorid, const error[], const callback[], const query[], MySQL:handle)
Reply
#5

Fixed!

Thanks to both Dayrion and AdamsLT.

If anyone else ever faces this problem, here is the solution:

PHP код:
public OnQueryError(errorid, const error[], const callback[], const query[], MySQL:handle
Reply
#6

Exactly what I talked about : https://sampwiki.blast.hk/wiki/MySQL/R40#OnQueryError
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)