Доступ к архиву

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

error 021 & error 047

Статус
В этой теме нельзя размещать новые ответы.

John_White

Дебютант
Ошибка:
PHP:
 error 021: symbol already defined: "ret_memcpy"
Код:
PHP:
new ret_memcpy;
Ошибка:
PHP:
error 021: symbol already defined: "strtok"
Код:
PHP:
public CrimInRange(Float:radi, playerid,copid)
{
	if(IsPlayerConnected(playerid)&&IsPlayerConnected(copid))
	{
		new Float:posx, Float:posy, Float:posz;
		new Float:oldposx, Float:oldposy, Float:oldposz;
		new Float:tempposx, Float:tempposy;
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		GetPlayerPos(copid, posx, posy, posz);
		tempposx = (oldposx -posx);
		tempposy = (oldposy -posy);
		if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)))
		{
			return 1;
		}
	}
	return 0;
}
stock IsPlayerApplyAnimation(playerid, animation[])
{
    if(!GetPlayerAnimationIndex(playerid)) return 0;
    else
    {
        new animlib[32], animname[32];
        GetAnimationName(GetPlayerAnimationIndex(playerid), animlib, sizeof(animlib), animname, sizeof(animname));
        if(!strcmp(animname, animation, true)) return 1;
    }
    return 0;
}

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

Ошибка:
PHP:
error 047: array sizes do not match, or destination array is too small
Код:
PHP:
{
	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;
}

В последнем случае банальное увилечение количества предостовляемых яйчеек не помогает.
Пожалуйста,подскажите как все это исправить.
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу