The problem about the gang FS
#1

I have compiled a FS and it gives me 10 errors that I cannot solve:

G:\Server\filterscripts\gang.pwn(265) : error 017: undefined symbol "strtok"
G:\Server\filterscripts\gang.pwn(265) : error 033: array must be indexed (variable "cmd")
G:\Server\filterscripts\gang.pwn(304) : error 017: undefined symbol "strtok"
G:\Server\filterscripts\gang.pwn(304) : error 033: array must be indexed (variable "tmp")
G:\Server\filterscripts\gang.pwn(323) : error 017: undefined symbol "strtok"
G:\Server\filterscripts\gang.pwn(323) : error 033: array must be indexed (variable "tmp")
G:\Server\filterscripts\gang.pwn(343) : error 017: undefined symbol "strtok"
G:\Server\filterscripts\gang.pwn(343) : error 033: array must be indexed (variable "tmp")
G:\Server\filterscripts\gang.pwn(369) : error 017: undefined symbol "strtok"
G:\Server\filterscripts\gang.pwn(369) : error 033: array must be indexed (variable "tmp")
G:\Server\filterscripts\gang.pwn(264) : warning 203: symbol is never used: "idx"

Your help would be much appreciated. Thanks in advance.
Reply
#2

Copy and paste the scripts in the error lines given.
Reply
#3

Sorry for forgetting about them, here they are:

Line 265:
pawn Код:
cmd = strtok(cmdtext, idx);
Line 304:
pawn Код:
tmp = strtok(cmdtext, idx);
Line 323:
pawn Код:
tmp = strtok(cmdtext, idx);
Line 343:
pawn Код:
tmp = strtok(cmdtext, idx);
Line 369:
pawn Код:
tmp = strtok(cmdtext, idx);
Line 264:
pawn Код:
new idx;
The errors from lines 304, 323, 343, 369 are from the FS commands
Reply
#4

That means you don't have strtok. You need the strtok function. ****** it to find it. Although I do suggest you use another command processor such as zcmd or y_cmd.
Reply
#5

Quote:
Originally Posted by Neozftw
Посмотреть сообщение
That means you don't have strtok. You need the strtok function. ****** it to find it. Although I do suggest you use another command processor such as zcmd or y_cmd.
Would you mind helping me by posting it here? I'm not good at googling...
Reply
#6

Код:
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;
}
Put this on the top of your script

Line 264:
new idx;

Delete this !

Tel me if it work's
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)