PDA

View Full Version : Help Me With This Error.


GauthamIndia
26/08/2012, 04:31 AM
The Error Is


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


stock Float:GetPosInFrontOfPlayer(playerid, &Float:x, &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;
}

Akira297
26/08/2012, 04:33 AM
' return a; ' ~

Shouldn't it be, Return 1;

GauthamIndia
26/08/2012, 04:36 AM
nope that is suppose to return a

anyway i fixed the problem

i just had to do

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