Argument type mismatch ( type 2 )
#1

Hey there, i am having a error while compiling "arguement type mismatch ( type 2 ) in the following line, expect help from you guys.
Code:
public Float:SetPlayerToFacePos(playerid, Float:X, Float:Y)
{
	new
		Float:pX,
		Float:pY,
		Float:pZ,
		Float:ang;

	if(!IsPlayerConnected(playerid)) return 0.0;

	GetPlayerPos(playerid, pX, pY, pZ); // here is the error.

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


Messages In This Thread
Argument type mismatch ( type 2 ) - by Laure - 05.05.2014, 08:15
Re: Argument type mismatch ( type 2 ) - by BroZeus - 05.05.2014, 08:18
Re: Argument type mismatch ( type 2 ) - by Laure - 05.05.2014, 08:19
Re: Argument type mismatch ( type 2 ) - by Laure - 05.05.2014, 08:35
Re: Argument type mismatch ( type 2 ) - by Patrick - 05.05.2014, 08:41
Re: Argument type mismatch ( type 2 ) - by Laure - 05.05.2014, 08:56
Re: Argument type mismatch ( type 2 ) - by Vince - 05.05.2014, 09:02
Re: Argument type mismatch ( type 2 ) - by Laure - 05.05.2014, 09:08
Re: Argument type mismatch ( type 2 ) - by Vince - 05.05.2014, 09:18
Re: Argument type mismatch ( type 2 ) - by Laure - 05.05.2014, 09:26
Re: Argument type mismatch ( type 2 ) - by Vince - 05.05.2014, 10:16

Forum Jump:


Users browsing this thread: 2 Guest(s)