An error. Making my own gamemode
#5

@X337 tried your solution and it worked. But now i have another error with gTeam which is only in 1 command the other cmds which use gTeam don't have those errors.
Код:
E:\backup\SFCRRPG\gamemodes\Sandhu.pwn(981) : error 017: undefined symbol "gTeam"
E:\backup\SFCRRPG\gamemodes\Sandhu.pwn(981) : warning 215: expression has no effect
E:\backup\SFCRRPG\gamemodes\Sandhu.pwn(981) : error 001: expected token: ";", but found "]"
E:\backup\SFCRRPG\gamemodes\Sandhu.pwn(981) : error 029: invalid expression, assumed zero
E:\backup\SFCRRPG\gamemodes\Sandhu.pwn(981) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Код:
CMD:tazer(playerid, params[])
{
	if(gTeam[playerid] == LSPD) // For cops //981
    {
    	if(IsPlayerInAnyVehicle(playerid)) // Checks if the player is in a vehicle.
        {
        	SendClientMessage(playerid, 0xFF0000FF, "You can't use this command while in a car!");
         	return 1;
        }
        if(pTazer[playerid] == 0) // If the player has no tazer withdrawn.
        {
            GivePlayerWeapon(playerid, 23, 9999); // Gives a SD.
            pTazer[playerid] = 1; // Sets the var to true.
            return 1;
        }
        else if(pTazer[playerid == 1) // If the player has the tazer withdrawn to holster it.
        {
            GivePlayerWeapon(playerid, 24, 250); // Gives a deagle.
            pTazer[playerid] = 0; // Sets the var to false.
            return 1;
        }
    }
    else
    {
    SendClientMessage(playerid, COLOR_RED, "You are not a cop!");
	}
 	return 1;
}
Reply


Messages In This Thread
An error. Making my own gamemode - by StrikerZ - 05.10.2016, 06:34
Re: An error. Making my own gamemode - by X337 - 05.10.2016, 07:00
Re: An error. Making my own gamemode - by DwayneMichael - 05.10.2016, 07:01
Re: An error. Making my own gamemode - by StrikerZ - 05.10.2016, 07:15
Re: An error. Making my own gamemode - by StrikerZ - 05.10.2016, 07:18
Re: An error. Making my own gamemode - by Tass007 - 05.10.2016, 07:23
Re: An error. Making my own gamemode - by StrikerZ - 05.10.2016, 07:44
Re: An error. Making my own gamemode - by Tass007 - 05.10.2016, 07:52
Re: An error. Making my own gamemode - by StrikerZ - 05.10.2016, 07:57
Re: An error. Making my own gamemode - by Tass007 - 05.10.2016, 08:15

Forum Jump:


Users browsing this thread: 3 Guest(s)