SA-MP Forums Archive
my strtok is broken (Im lost) - 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: my strtok is broken (Im lost) (/showthread.php?tid=99495)



my strtok is broken (Im lost) - bubka3 - 28.09.2009

Errors
Quote:

C:\Users\Administrator\Desktop\B3RPG\gamemodes\b3r pg.pwn(1725) : error 025: function heading differs from prototype
C:\Users\Administrator\Desktop\B3RPG\gamemodes\b3r pg.pwn(1726) : error 021: symbol already defined: "strtok"
C:\Users\Administrator\Desktop\B3RPG\gamemodes\b3r pg.pwn(1741) : error 047: array sizes do not match, or destination array is too small
C:\Users\Administrator\Desktop\B3RPG\gamemodes\b3r pg.pwn(174 : error 047: array sizes do not match, or destination array is too small
C:\Users\Administrator\Desktop\B3RPG\gamemodes\b3r pg.pwn(1752) : error 047: array sizes do not match, or destination array is too small

Problem With
Quote:

stock strtok( const string[], &index, const seperator[] = " ")
{
new
index2,
result[ 30 ];

index2 = strfind(string, seperator, false, index);


if(index2 == -1)
{
if(strlen(string) > index)
{
strmid(result, string, index, strlen(string), 30);
index = strlen(string);
}
return result;
}
if(index2 > (index + 29))
{
index2 = index + 29;
strmid(result, string, index, index2, 30);
index = index2;
return result;
}
strmid(result, string, index, index2, 30);
index = index2 + 1;
return result;
}

I need this stock or all my commands break.


Re: my strtok is broken (Im lost) - XCultz - 28.09.2009

its probably in the inc just search alot of ppl had this problem man easy to find if u search


Re: my strtok is broken (Im lost) - bubka3 - 28.09.2009

Can you tell me which inc cause Im tried and its midnight


Re: my strtok is broken (Im lost) - ded - 28.09.2009

Get some sleep. Try again tomorrow by searching all includes and filterscripts for duplicates of strtok.


Re: my strtok is broken (Im lost) - bubka3 - 28.09.2009

Wait a Sec this happened when I made 5 commands. Hmm holdon


Re: my strtok is broken (Im lost) - Hiitch - 28.09.2009

Show the commands you made, there may be a problem with them, if not, comment them out with /*


Re: my strtok is broken (Im lost) - bubka3 - 28.09.2009

Nah, they werent it but it happened when I added this filterscript into my gamemode http://forum.sa-mp.com/index.php?topic=123009.0
Ima just keep it as a filterscript until I can fix it. If anyone has any idea let me know.