SA-MP Forums Archive
Help Me With This Error. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help Me With This Error. (/showthread.php?tid=372321)



Help Me With This Error. - GauthamIndia - 26.08.2012

The Error Is

Quote:

Project Infinity GamerX\Project Infinity GamerX [UAS]\gamemodes\Angels.pwn(7517) : warning 208: function with tag result used before definition, forcing reparse

The Code Is

Quote:

stock Float:GetPosInFrontOfPlayer(playerid, &Float, &Float:y, Float:distance)
{
new Float:a;
GetPlayerPos(playerid, x, y, a);
if (IsPlayerInAnyVehicle(playerid)) GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
else GetPlayerFacingAngle(playerid, a);
x += (distance * floatsin(-a, degrees));
y += (distance * floatcos(-a, degrees));
return a;
}




Re: Help Me With This Error. - Akira297 - 26.08.2012

' return a; ' ~

Shouldn't it be, Return 1;


Re: Help Me With This Error. - GauthamIndia - 26.08.2012

nope that is suppose to return a

anyway i fixed the problem

i just had to do

forward Float:GetPosInFrontOfPlayer(playerid, &Float, &Float:y, Float:distance);