#1

why this erors come ?
from here

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256], idx, tmp[256];
	cmd = strtok(cmdtext, idx);
Код:
C:\Users\pc\Desktop\GameModovi\Beyond GAME MOD\filterscripts\firmu.pwn(134) : error 017: undefined symbol "strtok"
C:\Users\pc\Desktop\GameModovi\Beyond GAME MOD\filterscripts\firmu.pwn(134) : error 033: array must be indexed (variable "cmd")
C:\Users\pc\Desktop\GameModovi\Beyond GAME MOD\filterscripts\firmu.pwn(320) : error 017: undefined symbol "strtok"
C:\Users\pc\Desktop\GameModovi\Beyond GAME MOD\filterscripts\firmu.pwn(320) : error 033: array must be indexed (variable "tmp")
C:\Users\pc\Desktop\GameModovi\Beyond GAME MOD\filterscripts\firmu.pwn(353) : error 017: undefined symbol "strtok"
C:\Users\pc\Desktop\GameModovi\Beyond GAME MOD\filterscripts\firmu.pwn(353) : error 033: array must be indexed (variable "tmp")
C:\Users\pc\Desktop\GameModovi\Beyond GAME MOD\filterscripts\firmu.pwn(133) : warning 203: symbol is never used: "idx"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply
#2

pawn Код:
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 in your gamemode
Reply
#3

THANKS <333 !, REP + !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)