SA-MP Forums Archive
Can't Fix Warning public function lacks forward declaration - 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: Can't Fix Warning public function lacks forward declaration (/showthread.php?tid=306395)



Can't Fix Warning public function lacks forward declaration - Immortal_LTU - 26.12.2011

Hi , I Have Got Problem . So The Warning Says :

UD-DRIFT.pwn(567) : warning 235: public function lacks forward declaration (symbol "NaujaNitro")

Line 567

public NaujaNitro()

The All Code :

//-------------------------[ IsPlayerInValidNosVehicle ]-------------------------------
IsPlayerInInvalidNosVehicle(playerid,vehicleid)
{
#define MAX_INVALID_NOS_VEHICLES 29

new InvalidNosVehicles[MAX_INVALID_NOS_VEHICLES] =
{
581,523,462,521,463,522,461,448,468,586,
509,481,510,472,473,493,595,484,430,453,
452,446,454,590,569,537,538,570,449
};

vehicleid = GetPlayerVehicleID(playerid);

if(IsPlayerInVehicle(playerid,vehicleid))
{
for(new i = 0; i < MAX_INVALID_NOS_VEHICLES; i++)
{
if(GetVehicleModel(vehicleid) == InvalidNosVehicles[i])
{
return true;
}
}
}
return false;
}
public NaujaNitro() // The 567 LINE
{
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(!IsPlayerInInvalidNosVehicle(i,GetPlayerVehicle ID(i))) // NETRINT
{
new vehicle = GetPlayerVehicleID(i);
AddVehicleComponent(vehicle, 1010);
}
}
}

Who Will Help Me , I Will Give You +Reputation .

Thanks


Re: Can't Fix Warning public function lacks forward declaration - DonWade - 26.12.2011

try to add on top of script

forward NaujaNitro();


Re: Can't Fix Warning public function lacks forward declaration - Immortal_LTU - 26.12.2011

DonWade - Allready Added It . Still Have The Same Warning


Re: Can't Fix Warning public function lacks forward declaration - Immortal_LTU - 26.12.2011

UP ! BUMP !


Re: Can't Fix Warning public function lacks forward declaration - DonWade - 26.12.2011

dont really know what is the problem , maybe you put forward in wrong place ?


Re: Can't Fix Warning public function lacks forward declaration - Immortal_LTU - 26.12.2011

I Always Put Forwards On Top Of The GameMode


Maybe i can send you gm and you can fix it , plz ? i can give skype name