pomoc sa 0.3 :S


Započeo ђเאק, Oktobar 20, 2009, 10:56:35 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

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 " /* */ " :)
Poslednja Izmena: Oktobar 20, 2009, 11:02:10 PRE PODNE od [CH]คภtє l๏שгค l๏שгเς | ђเאק

ma plzzz clickajte malooo :'(

Trawis

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