SA-MP Forums Archive
+1 rep for helping me out. - 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: +1 rep for helping me out. (/showthread.php?tid=584375)



+1 rep for helping me out. - canip0000 - 04.08.2015

Hi I get this error then I compile my stuff

Код:
C:\Users\Canip\Desktop\GRP\gamemodes\lsrpedit.pwn(25226) : error 036: empty statement
C:\Users\Canip\Desktop\GRP\gamemodes\lsrpedit.pwn(35780) : warning 203: symbol is never used: "PoliceTrunk2"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
And this is the line.

Код:
 }
	else if(PlayerInCar(playerid))
	{
		new vehicle = GetPlayerVehicleID(playerid);//From here
		if(IsACopCar(vehicle));
		if(IsACopCarSD(vehicle))//To here
		{
			if(slotid >= sizeof(PoliceTrunk)) return SCM(playerid, COLOR_GREY, "Invalid slot.");
			new faction = PlayerInfo[playerid][pFaction];
			if(faction != 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), "grabs a %s from the Cruiser's trunk.", GetWeaponNameEx(PoliceTrunk[slotid][wepID]));
			ActionMessage(playerid, 15.0, msg);
			GiveWeapon(playerid, PoliceTrunk[slotid][wepID], PoliceTrunk[slotid][wepAmmo]);
		}



Re: +1 rep for helping me out. - xVIP3Rx - 04.08.2015

" if(IsACopCar(vehicle));"
Remove this.


Re: +1 rep for helping me out. - canip0000 - 04.08.2015

I need that one.

It has to define both of them.


Re: +1 rep for helping me out. - MarvinPWN - 04.08.2015

Do you mean it like this?
PHP код:
else if(PlayerInCar(playerid))
{
    new 
vehicle GetPlayerVehicleID(playerid);
    if(
IsACopCar(vehicle) && IsACopCarSD(vehicleid))
    {
        if(
slotid >= sizeof(PoliceTrunk)) return SCM(playeridCOLOR_GREY"Invalid slot.");
        new 
faction PlayerInfo[playerid][pFaction];
        if(
faction != LSPD && SASD) return SCM(playeridCOLOR_LIGHTRED"Invalid faction.");
        if(!
CopDuty{playerid}) return SCM(playeridCOLOR_LIGHTRED"You must be on duty.");
        
format(msgsizeof(msg), "grabs a %s from the Cruiser's trunk."GetWeaponNameEx(PoliceTrunk[slotid][wepID]));
        
ActionMessage(playerid15.0msg);
        
GiveWeapon(playeridPoliceTrunk[slotid][wepID], PoliceTrunk[slotid][wepAmmo]);
    }




Re: +1 rep for helping me out. - Variable™ - 04.08.2015

Код:
        else if(PlayerInCar(playerid))
	{
		new vehicle;
                vehicle = GetPlayerVehicleID(playerid);
		if(IsACopCar(vehicle))
		if(IsACopCarSD(vehicle)
		{
			if(slotid >= sizeof(PoliceTrunk)) return SCM(playerid, COLOR_GREY, "Invalid slot.");
			new faction = PlayerInfo[playerid][pFaction];
			if(faction != 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), "grabs a %s from the Cruiser's trunk.", GetWeaponNameEx(PoliceTrunk[slotid][wepID]));
			ActionMessage(playerid, 15.0, msg);
			GiveWeapon(playerid, PoliceTrunk[slotid][wepID], PoliceTrunk[slotid][wepAmmo]);
		}



Re: +1 rep for helping me out. - Variable™ - 04.08.2015

Worked?


Re: +1 rep for helping me out. - xVIP3Rx - 04.08.2015

Quote:
Originally Posted by MarvinPWN
Посмотреть сообщение
Do you mean it like this?
PHP код:
else if(PlayerInCar(playerid))
{
    new 
vehicle GetPlayerVehicleID(playerid);
    if(
IsACopCar(vehicle) && IsACopCarSD(vehicleid))
    {
        if(
slotid >= sizeof(PoliceTrunk)) return SCM(playeridCOLOR_GREY"Invalid slot.");
        new 
faction PlayerInfo[playerid][pFaction];
        if(
faction != LSPD && SASD) return SCM(playeridCOLOR_LIGHTRED"Invalid faction.");
        if(!
CopDuty{playerid}) return SCM(playeridCOLOR_LIGHTRED"You must be on duty.");
        
format(msgsizeof(msg), "grabs a %s from the Cruiser's trunk."GetWeaponNameEx(PoliceTrunk[slotid][wepID]));
        
ActionMessage(playerid15.0msg);
        
GiveWeapon(playeridPoliceTrunk[slotid][wepID], PoliceTrunk[slotid][wepAmmo]);
    }

Yes.