Need help with Warnings.
#1

Here is the warnings
Код:
C:\Users\Canip\Desktop\GRP\gamemodes\lsrpedit.pwn(25060) : warning 204: symbol is assigned a value that is never used: "faction"
C:\Users\Canip\Desktop\GRP\gamemodes\lsrpedit.pwn(25208) : warning 204: symbol is assigned a value that is never used: "faction"
C:\Users\Canip\Desktop\GRP\gamemodes\lsrpedit.pwn(25361) : warning 204: symbol is assigned a value that is never used: "faction"
Here is one of the script lines.

Код:
else if(PlayerInCar(playerid))
	{
		new vehicle = GetPlayerVehicleID(playerid);
        if(IsACopCar(vehicle))
		{
			if(!CheckWeapon(playerid, weaponid)) return SCM(playerid, COLOR_LIGHTRED, "You don't have this weapon.");
			if(weaponid == 3 || weaponid == 24 || weaponid == 41) return SCM(playerid, COLOR_LIGHTRED, "You may not place this weapon.");
			new faction = PlayerInfo[playerid][pFaction];
			if(PlayerInfo[playerid][pFaction] != LSPD && SASD) return SCM(playerid, COLOR_LIGHTRED, "Invalid faction");
			if(!CopDuty{playerid}) return SCM(playerid, COLOR_LIGHTRED, "You must be on duty.");
			format(msg, sizeof(msg), "stores a %s in the Cruiser's trunk.", GetWeaponNameEx(weaponid));
			ActionMessage(playerid, 15.0, msg);
			RemovePlayerWeapon(playerid, weaponid);
		}
Reply
#2

It just means that you defined faction (On or near line 8 I believe) and never used it anywhere in the script, and that's actually what it shows on your code block.
Reply
#3

^^^


Remove

Код:
new faction = PlayerInfo[playerid][pFaction];
And you're good to go!

You're making a new faction= blabla

and then you're never using it again.
Reply
#4

Add:
Код:
#pragma unused faction
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)