SA-MP Forums Archive
Problem Including IsPlayerLAdmin - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem Including IsPlayerLAdmin (/showthread.php?tid=138170)



Problem Including IsPlayerLAdmin - [SsC11]MAVERIK - 31.03.2010

When i add this -> #include <IsPlayerLAdmin>

I get this:

D:\Server SA-MP\peppe\gamemodes\lvdm.pwn(2654) : error 021: symbol already defined: "strtok"
D:\Server SA-MP\peppe\gamemodes\lvdm.pwn(2669) : error 047: array sizes do not match, or destination array is too small
D:\Server SA-MP\peppe\gamemodes\lvdm.pwn(2715) : warning 203: symbol is never used: "ret_memcpy"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

Код:
public SendAllFormattedText(playerid, const str[], define)
{
	new tmpbuf[256];
	format(tmpbuf, sizeof(tmpbuf), str, define);
	SendClientMessageToAll(0xFFFF00AA, tmpbuf);
}

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;
}
2653: strtok(const string[], &index)
2654: {
2669: return result;

Why?







Re: Problem Including IsPlayerLAdmin - aircombat - 31.03.2010

delete this from ur script :
Код:
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;
}
and add in top of ur Script under the include :
Код:
#pragma unused ret_memcpy



Re: Problem Including IsPlayerLAdmin - [SsC11]MAVERIK - 31.03.2010

ty


Re: Problem Including IsPlayerLAdmin - aircombat - 31.03.2010

np anytime