PDA

Просмотр полной версии : [Вопрос] error 12, 29, fatal error 107.



xxlex
19.09.2016, 22:50
stock RadiusPlayer(Float:radius, playerid, gplayerid)
{
new Float: x;
new Float: y;
new Float: z;
new Float: oldx;
new Float: oldy;
new Float: oldz;
new Float: tempx;
new Float: tempy;
new Float: tempz;
GetPlayerPos(playerid, oldx, oldy, oldz);
GetPlayerPos(gplayerid, x, y, z);
tempx = (oldx - x);
tempy = (oldy - y);
tempz = (oldz - z);
if(((tempx < radius) && (tempx > -radius)) && ((tempy < radius) && (tempy > -radius)) && ((tempz < radius) (tempz > -radius))) return true;
return true;
}

Ошибки 12, 29 и 107 в строке if(((tempx < radius) && (tempx > -radius)) && ((tempy < radius) && (tempy > -radius)) && ((tempz < radius) (tempz > -radius))) return true;
что неправильно в этой строке?

DeimoS
19.09.2016, 23:40
Эмм, очень странная функция. И реализация ужасная, и возвращается всегда "true", что делает функцию бессмысленной...

stock RadiusPlayer(Float:range, playerid, giveplayerid)
{
new Float: x,
Float: y,
Float: z;
GetPlayerPos(giveplayerid, x, y, z);
if(!IsPlayerInRangeOfPoint(playerid, range, x, y, z)) return true;
return false;
}