SA-MP Forums Archive
Help with error please :( - 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: Help with error please :( (/showthread.php?tid=298697)



Help with error please :( - rokata555 - 22.11.2011

Код:
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4107) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4107) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4106) : warning 203: symbol is never used: "idx"
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4126) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4126) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4125) : warning 203: symbol is never used: "idx"
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4145) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4145) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4144) : warning 203: symbol is never used: "idx"
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4164) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4164) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4163) : warning 203: symbol is never used: "idx"
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4183) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4183) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4182) : warning 203: symbol is never used: "idx"
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4223) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4223) : error 033: array must be indexed (variable "cmd")
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4327) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4327) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4340) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4340) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4647) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4647) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4694) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4694) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4892) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4892) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4992) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(4992) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(5001) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\Bulgarian Red-Bone County Roleplay\gamemodes\gangwars.pwn(5001) : error 033: array must be indexed (variable "tmp")

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.



Re: Help with error please :( - Qur - 22.11.2011

from what I see you need to define your strtok and can you post this parts? maybe we'll be able to help


Re: Help with error please :( - Wesley221 - 22.11.2011

And this ladies & gentlemans, this is why you shouldnt copy-paste.


Re: Help with error please :( - rokata555 - 22.11.2011

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new string[256];
	new cmd[256];
	new tmp[256];
	new playermoney;
	new giveplayer[MAX_PLAYER_NAME];
	new giveplayerid, specplayerid, moneys, idx;
	cmd = strtok(cmdtext, idx);
    printf("[cmd][%s]: %s",PlayerName(playerid),cmdtext);
Код:
	}
	if(strcmp(cmd, "/makeleader", true) == 0)
	{
 		if(IsPlayerConnected(playerid))
   		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{



Re: Help with error please :( - rokata555 - 22.11.2011

help ;(


Re: Help with error please :( - Kostas' - 22.11.2011

Do you have it this?
pawn Код:
stock strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' ')) {
        index++;
    }
    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1))) {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}



Re: Help with error please :( - Steven82 - 22.11.2011

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
And this ladies & gentlemans, this is why you shouldnt copy-paste.
So true..