D:\Unitech Roleplay\gamemodes\ug-rp.pwn(3735) : error 012: invalid function call, not a valid address D:\Unitech Roleplay\gamemodes\ug-rp.pwn(3735) : warning 215: expression has no effect D:\Unitech Roleplay\gamemodes\ug-rp.pwn(3735) : warning 215: expression has no effect D:\Unitech Roleplay\gamemodes\ug-rp.pwn(3735) : warning 215: expression has no effect D:\Unitech Roleplay\gamemodes\ug-rp.pwn(3735) : error 001: expected token: ";", but found ")" D:\Unitech Roleplay\gamemodes\ug-rp.pwn(3735) : error 029: invalid expression, assumed zero D:\Unitech Roleplay\gamemodes\ug-rp.pwn(3735) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
forward Float:SetPlayerToFacePos(playerid, Float:X, Float:Y);
public Float:SetPlayerToFacePos(playerid, Float:X, Float:Y)
{
new Float:pX,Float:pY,Float:pZ,Float:ang;
if(IsPlayerConnected(playerid))
GetPlayerPos(playerid, pX, pY, pZ);
if( Y > pY ) ang = (-acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);
else if( Y < pY && X < pX ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 450.0); // error line
else if( Y < pY ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);
if(X > pX) ang = (floatabs(floatabs(ang) + 180.0));
else ang = (floatabs(ang) - 180.0);
ang += 180.0;
SetPlayerFacingAngle(playerid, ang);
return ang;
}
PS: I used to get 20 warnings and 1 error till i didnt add new Float:SetPlayerToFacePos[MAX_PLAYERS]; in the top of my script..
|