MySQL Error - 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: MySQL Error (
/showthread.php?tid=245703)
MySQL Error -
tbedy - 01.04.2011
i use GodFather mode..
my gamemode was without errors, and when i put in my script MySQL, i have this 2 error!!
errors:
Код:
C:\Documents and Settings\Toni Bedy\Desktop\lecevica!!\gamemodes\maddoxgf.pwn(168) : error 025: function heading differs from prototype
C:\Documents and Settings\Toni Bedy\Desktop\lecevica!!\gamemodes\maddoxgf.pwn(7631) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
lines:
168:
Код:
forward split(const strsrc[], strdest[][], delimiter);
7631:
Код:
ppublic 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;
}
Re: MySQL Error -
Garry Roger - 01.04.2011
Код:
forward split(const strsrc[], strdest[][], delimiter);// add at top of script
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;
}
Re: MySQL Error -
tbedy - 01.04.2011
nothing, this 2x"p" i write here, but in gamemode is only 1 "p"..
please help me people, i think that this is not so hard error!
Re: MySQL Error -
Garry Roger - 01.04.2011
pawn Код:
forward split(const strsrc[], strdest[][], delimiter);// add at top of script
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;
}
put the public at the bottom of your script and put your forward at the top
Re: MySQL Error -
tbedy - 01.04.2011
nothing different, again errors....
please help me, i really dont know where is problem
Re: MySQL Error -
s0nic - 02.04.2011
Make sure you don't have the function in your script twice or in a include your using..
and you can just use it as a stock, thats how i have mine and it works fine.
Not entirely sure why your getting that error but it wouldn't hurt to check.