Returning Float in function
#1

Good evening, ok, so I wanted to create a function which is detecting on which degree is player aiming, so I found the way to create it with sin and cos, but when I am trying to return a float of angle I get warning. So I did it in two versions I will post both but I don`t know what is problem, in both is same warning:

PHP код:
stock GetPlayerAimingPoint(playeridFloat:Angle)
{
    new 
Float:XFloat:YFloat:Z//Float:Angle;
    
GetPlayerPos(playeridXYZ);
    
GetPlayerFacingAngle(playeridAngle);
    
+= (floatsin(-Angledegrees));
    
+= (floatcos(-Angledegrees));
    return 
Angle;//Warning Line
}
//Version 2
stock GetPlayerAimingPoint(playeridFloat:Angle)
{
    new 
Float:XFloat:YFloat:Z//Float:Angle;
    
GetPlayerPos(playeridXYZ);
    
GetPlayerFacingAngle(playeridAngle);
    
+= (floatsin(-Angledegrees));
    
+= (floatcos(-Angledegrees));
    return 
Float:Angle;//warning Line

Warning:
Код:
warning 213: tag mismatch
Reply


Messages In This Thread
Returning Float in function - by Sanady - 16.10.2016, 18:07
Re: Returning Float in function - by Banana_Ghost - 16.10.2016, 18:09
Re: Returning Float in function - by Sanady - 16.10.2016, 18:12
Re: Returning Float in function - by SickAttack - 16.10.2016, 18:12
Re: Returning Float in function - by Banana_Ghost - 16.10.2016, 18:13
Re: Returning Float in function - by Sanady - 16.10.2016, 18:15
Re: Returning Float in function - by SickAttack - 16.10.2016, 18:17
Re: Returning Float in function - by Banana_Ghost - 16.10.2016, 18:17
Re: Returning Float in function - by Sanady - 16.10.2016, 18:25
Re: Returning Float in function - by Sanady - 16.10.2016, 18:33

Forum Jump:


Users browsing this thread: 1 Guest(s)