SA-MP Forums Archive
warning 208: function with tag result used before definition, forcing reparse - 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: warning 208: function with tag result used before definition, forcing reparse (/showthread.php?tid=489607)



warning 208: function with tag result used before definition, forcing reparse - Wayland - 23.01.2014

Here's the scripts
pawn Code:
stock Float:IsABoomboxNearby(Float:posX, Float:posY, Float:posZ, playerid)//this line
{
    new Float: boomboxDistance;
    boomboxDistance = GetDistance(posX, posY, posZ, BoomboxInfo[playerid][bbPosX], BoomboxInfo[playerid][bbPosY], BoomboxInfo[playerid][bbPosZ]);
    return boomboxDistance;
}
Warning
PHP Code:
C:\Users\TEST\Desktop\New folder\LYL.pwn(4065) : warning 208: function with tag result used before definitionforcing reparse
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
1 Warning




Re: warning 208: function with tag result used before definition, forcing reparse - Kyance - 23.01.2014

Try moving the
pawn Code:
stock Float:IsABoomboxNearby(Float:posX, Float:posY, Float:posZ, playerid)//this line
{
    new Float: boomboxDistance;
    boomboxDistance = GetDistance(posX, posY, posZ, BoomboxInfo[playerid][bbPosX], BoomboxInfo[playerid][bbPosY], BoomboxInfo[playerid][bbPosZ]);
    return boomboxDistance;
}
Before / after the command/place where you're using it.

pawn Code:
//the boombox script here
stock Float:IsABoomboxNearby(Float:posX, Float:posY, Float:posZ, playerid)//this line
{
    new Float: boomboxDistance;
    boomboxDistance = GetDistance(posX, posY, posZ, BoomboxInfo[playerid][bbPosX], BoomboxInfo[playerid][bbPosY], BoomboxInfo[playerid][bbPosZ]);
    return boomboxDistance;
}
Or
pawn Code:
stock Float:IsABoomboxNearby(Float:posX, Float:posY, Float:posZ, playerid)//this line
{
    new Float: boomboxDistance;
    boomboxDistance = GetDistance(posX, posY, posZ, BoomboxInfo[playerid][bbPosX], BoomboxInfo[playerid][bbPosY], BoomboxInfo[playerid][bbPosZ]);
    return boomboxDistance;
}
//the boombox script here
When i compile it, i get no warnings.

Maybe check the line above it or something.