Help with error 025? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with error 025? (
/showthread.php?tid=193839)
Help with error 025? -
mtywe - 27.11.2010
I get the error: error 025: function heading differs from prototype
I have been chaging my gamemode from this mysql plugin:
https://sampforum.blast.hk/showthread.php?tid=7106
to this one:
https://sampforum.blast.hk/showthread.php?tid=56564
The lines of code that are getting the error are:
Код:
forward strcount(const string[], delimiter);
Код:
public split(const strsrc[], strdest[][], delimiter)
{
new i, li;
new aNum;
new len;
while(i <= strlen(strsrc)){
if(strsrc[i]==delimiter || i==strlen(strsrc)){
len = strmid(strdest[aNum], strsrc, li, i, 128);
strdest[aNum][len] = 0;
li = i+1;
aNum++;
}
i++;
}
return 1;
}
these errors happened after i changed all the code for the mysql.
Re: Help with error 025? -
Miguel - 27.11.2010
That means your forward is different to your public function (callback).
For example:
pawn Код:
forward OnPlayerDoSomething(playerid, reason);
public OnPlayerDoSomething(playerid, thereason) // "thereason" is not the same as "reason".
{
return 1;
}
Re: Help with error 025? -
mtywe - 27.11.2010
Код:
public strcount(const string[], delimiter[])
{
new i, count;
while(i <= strlen(string)){
if(string[i]==delimiter || i==strlen(string)){
count++;
}
i++;
}
return count;
}
theres the public
btw i didnt get these erros until i changed all the code from the old mysql plugin... so does it have to do witht that?
Re: Help with error 025? -
Miguel - 27.11.2010
"delimiter" is not the same as "delimiter[]" (the second one is an array).
Solution:
pawn Код:
public strcount(const string[], delimiter) // Change delimiter by this one.
By the way, use [ pawn] [ /pawn] tags instead of [ code] [ /code], it looks much better!
Re: Help with error 025? -
randomkid88 - 27.11.2010
Your public:
pawn Код:
public split(const strsrc[], strdest[][], delimiter)
Your forward:
pawn Код:
forward split(const strsrc[], strdest[], delimiter)
See the difference? It has to do with strdest. One has [], the other has [][]. The public you have is correct. So your forward should be:
pawn Код:
forward split(const strsrc[], strdest[][], delimiter);
Re: Help with error 025? -
mtywe - 27.11.2010
The code mathces what you say yet it is still giving same errors, LISTEN!!!! the code is giving errors ONLY when the mysql stuff is changed.... When its samp_mysql_xxxx its fine but when i use gstylez i get those 2 errors mysql_xxxxx