Errors
#1

Okay, so there is a command in my script called /badge, for police (group one), And i edited that to my likeing, But then i tried to remake it for F.B.I
The copduty one is:
Код:
command(badge, playerid, params[])
{
	if (Player[playerid][Group] == 1) {
		new string[128];
		switch(Player[playerid][pBadge])
		{
		    case 0:
		    {
		        Player[playerid][pBadge] = 1;
		        format(string, sizeof(string), "* %s snaps on their badge", GetName(playerid));
				NearByMessage(playerid, NICESKY, string);
				SendClientMessage(playerid, WHITE, "You are now on duty");
				Player[playerid][CopDuty] = 1;
				SetPlayerColor(playerid, BLUE);
			 	Player[playerid][Ranks] = Rank5;
			 	SetPlayerSkin(playerid, 288);
				GivePlayerWeapon(playerid, 24, 200);
                GivePlayerWeapon(playerid, 3, 100);
                GivePlayerWeapon(playerid, 41, 1000);
			}


			case 1:
			{
			    Player[playerid][pBadge] = 0;
			    format(string, sizeof(string), "* %s snaps off their badge", GetName(playerid));
				NearByMessage(playerid, NICESKY, string);
				Player[playerid][CopDuty] = 0;
				SendClientMessage(playerid, WHITE, "You are now off duty");
				SetPlayerColor(playerid, WHITE);
				SetPlayerSkin(playerid, Player[playerid][LastSkin]);
				ResetPlayerWeapons(playerid);
			}
		}
	}
 	return 1;
}
And my F.B.I one is:
Код:
command(fbi, playerid, params[]) {
{
	if (Player[playerid][Group] == 7) {
		new string[128];
		switch(Player[playerid][undercover])
		{
				case 0:
				{
				    Player[playerid][undercover] = 1;
				    format(string, sizeof(string), "* %s clips his ID card on", GetName(playerid));
				    NearByMessage(playerid, NICESKY, string);
				    SendClientmessage(playerid, WHITE, "You are now working as an undercover agent for the F.B.I");
				    Player[playerid][FBIduty] = 1;
				    
				case 1:
				{
				    Player [playerid][undercover] = 0;
				    format(string, sizeof(string), "* %s unclips his ID card", GetName(playerid));
				    NearByMessage(playerid, NICSKY, string);
					Player[playerid][FBIduty] = 0;
					SendClientMessage(playerid, WHITE, "You are now a civilian again");
					
				}
			}
		}
		return 1;
}
My errors are:
Код:
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(1596) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(2080) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(2708) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(3184) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(4157) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(4170) : error 017: undefined symbol "SaveGroups"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(4171) : error 017: undefined symbol "UpdateAnalysis"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(4172) : error 017: undefined symbol "SaveJobs"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(4173) : error 017: undefined symbol "SaveHouses"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(4174) : error 017: undefined symbol "SaveBusinesses"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(4395) : error 004: function "GivePlayerWeaponEx" is not implemented
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(5510) : error 004: function "QuizText" is not implemented
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(5511) : error 004: function "QuizText" is not implemented
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(6147) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(6773) : error 004: function "GivePlayerWeaponEx" is not implemented
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(6785) : error 004: function "GivePlayerWeaponEx" is not implemented
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(7189) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(7196) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(7239) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(7271) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(7294) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(7497) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(7531) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(7565) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(7872) : error 004: function "GivePlayerWeaponEx" is not implemented
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(7893) : error 004: function "GivePlayerWeaponEx" is not implemented

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


26 Errors.
I also added FBIduty and undercover, under player stats.

Anyone know?
Reply
#2

Try this:

pawn Код:
command(fbi, playerid, params[])
{
        if (Player[playerid][Group] == 7)
        {
            new string[128];
            switch(Player[playerid][undercover])
            {
                case 0:
                {
                    Player[playerid][undercover] = 1;
                    format(string, sizeof(string), "* %s clips his ID card on", GetName(playerid));
                    NearByMessage(playerid, NICESKY, string);
                    SendClientmessage(playerid, WHITE, "You are now working as an undercover agent for the F.B.I");
                    Player[playerid][FBIduty] = 1;
                }
                case 1:
                {
                    Player [playerid][undercover] = 0;
                    format(string, sizeof(string), "* %s unclips his ID card", GetName(playerid));
                    NearByMessage(playerid, NICSKY, string);
                    Player[playerid][FBIduty] = 0;
                    SendClientMessage(playerid, WHITE, "You are now a civilian again");

                }
            }
        }
        return 1;
}
Reply
#3

Thanks but i still got
Код:
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(16011) : warning 213: tag mismatch
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(16011) : warning 213: tag mismatch
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(16040) : error 017: undefined symbol "undercover"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(16044) : error 017: undefined symbol "undercover"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(16047) : error 017: undefined symbol "SendClientmessage"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(16052) : error 017: undefined symbol "undercover"
C:\Users\Josh\Desktop\FCSLRP\gamemodes\Roleplay.pwn(20226) : error 021: symbol already defined: "cmd_fbi"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#4

Bump
Reply
#5

Change the command from cmd:fbi because it is already used


its "SendClientMessage"
pawn Код:
Pinfo
{
undercover
}
new Player[MAX_PLAYERS][Pinfo];
Reply
#6

Did you define "undercover" in the PlayerInfo? ?
Reply
#7

Define it as what?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)