Balkan SA:MP

San Andreas Multiplayer - www.sa-mp.com => Pomoć u vezi SAMP-a => Pomoć u vezi SA-MP servera => Temu započeo: ђเאק poslato Oktobar 20, 2009, 10:56:35 PRE PODNE

Naslov: pomoc sa 0.3 :S
Poruka od: ђเאק poslato Oktobar 20, 2009, 10:56:35 PRE PODNE
eo imam 2 errora :S

C:\Documents and Settings\-.-\Desktop\samp03asvr_win32\gamemodes\bf.pwn(9981) : error 021: symbol already defined: "strtok"
C:\Documents and Settings\-.-\Desktop\samp03asvr_win32\gamemodes\bf.pwn(9996) : 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.


EDIT: evo ti redovi


9981:

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


9996 je ovo return result;
a 9981 je "{" prva


eo popravia san ne treba vise :=) samo sam " /* */ " :)
Naslov: Odg: pomoc sa 0.3 :S
Poruka od: Trawis poslato Oktobar 20, 2009, 13:54:55 POSLE PODNE
izbrisi taj strtok ili stavi ovak:
/*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;
}*/