Help with error please :(
#1

Код:
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.
Reply
#2

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

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

Код:
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))
			{
Reply
#5

help ;(
Reply
#6

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;
}
Reply
#7

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


Forum Jump:


Users browsing this thread: 1 Guest(s)