[POMOC] Strtok

Započeo Hacked, Mart 07, 2011, 15:03:06 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim: FS od BalkanNations
Detaljan opis problema:
G:\Ravens\yber\filterscripts\bizz.pwn(640) : error 021: symbol already defined: "strtok"
G:\Ravens\yber\filterscripts\bizz.pwn(655) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):
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;d
}
/



cristiane

Citat: [CE]Don_Sergio poslato Mart 07, 2011, 15:06:29 POSLE PODNE
??
Citaterror 021: symbol already defined: "strtok"
Imaš već definiran strtok,izbrišeš ovo i riješen problem
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;d
}