Problem Including IsPlayerLAdmin
#1

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?




Reply
#2

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
Reply
#3

ty
Reply
#4

np anytime
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)