[AJUDA] srtok erro !
#1

Код:
(1275) : error 017: undefined symbol "strtok"
C:\Users\Gabriel\Downloads\samp03dsvr_R2_win32\gamemodes\GM1.pwn(1275) : error 029: invalid expression, assumed zero
C:\Users\Gabriel\Downloads\samp03dsvr_R2_win32\gamemodes\GM1.pwn(1275) : error 029: invalid expression, assumed zero
C:\Users\Gabriel\Downloads\samp03dsvr_R2_win32\gamemodes\GM1.pwn(1275) : fatal error 107: too many error messages on one line

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


5 Errors.
Final do GM :
Код:
	 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
#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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)