Rob bank
#1

I got this error

Код:
C:\Users\Ramin\Desktop\Spel\PL-RP\gamemodes\PLRP.pwn(43249) : error 017: undefined symbol "TimeAfterBankJob"
C:\Users\Ramin\Desktop\Spel\PL-RP\gamemodes\PLRP.pwn(43254) : error 017: undefined symbol "TimeAfterBankJob"
C:\Users\Ramin\Desktop\Spel\PL-RP\gamemodes\PLRP.pwn(43260) : error 017: undefined symbol "BankJobPlayer"
C:\Users\Ramin\Desktop\Spel\PL-RP\gamemodes\PLRP.pwn(43267) : error 017: undefined symbol "BankJobPlayer"
C:\Users\Ramin\Desktop\Spel\PL-RP\gamemodes\PLRP.pwn(43271) : error 017: undefined symbol "BankJobTime"
C:\Users\Ramin\Desktop\Spel\PL-RP\gamemodes\PLRP.pwn(43316) : error 017: undefined symbol "BankJobTime"
C:\Users\Ramin\Desktop\Spel\PL-RP\gamemodes\PLRP.pwn(43316) : warning 215: expression has no effect
C:\Users\Ramin\Desktop\Spel\PL-RP\gamemodes\PLRP.pwn(43317) : error 017: undefined symbol "BankJobPlayer"
C:\Users\Ramin\Desktop\Spel\PL-RP\gamemodes\PLRP.pwn(43317) : warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
Код:
CMD:robbank(playerid, params[])

{
	if(PlayerInfo[playerid][pLevel] < 3)

	{
		SendClientMessage(playerid, COLOR_GREY, "   You must be a level 3 or higher to be able to rob the bank.");
		return 1;

	}
	if(IsACop(playerid))

	{
		SendClientMessage(playerid, COLOR_GREY, "   Law Enforcement Officials cannot rob the bank.");
		return 1;

	}
	if(!IsPlayerInRangeOfPoint(playerid, 3.0, 2388.4727, -1596.8754, 785.6183))

	{
		SendClientMessage(playerid, COLOR_GREY, "   You are not at the bank safe.");
		return 1;

	}
	if(TimeAfterBankJob < TIME_BETWEEN_BANKJOBS)

	{
		new bjt;
  new string[128];
		bjt = TIME_BETWEEN_BANKJOBS - TimeAfterBankJob;
		format(string, sizeof(string), "   You must wait %d hours before making the next bank robbery attempt.", bjt);
		SendClientMessage(playerid, COLOR_GREY, string);
		return 1;

	}
	if(BankJobPlayer < 999 && BankJobPlayer != playerid)

	{
		SendClientMessage(playerid, COLOR_GREY, "   Someone is already robbing the bank.");
		return 1;

	}
	if(BankJobPlayer == playerid)

	{
     new string[128];
		format(string, 256, "   You're already robbing the bank! %d minutes left.", BankJobTime / 2);
		SendClientMessage(playerid, COLOR_GREY, string);
		return 1;

	}
	new Cops = 0;
	for(new i = 0; i < MAX_PLAYERS; i++)

	{
		if(IsACop(i))

		{
			Cops += 1;

		}

	}
	if(!(Cops >= 0))

	{
		SendClientMessage(playerid,COLOR_GREY,"   There must be at least 6 Law Enforcement Officials online.");
		return 1;

	}
 new string[128];
	new giveplayerid;
	format(string, 256, "You have started the robbery, you must stay inside the bank for %d minutes.", BANK_JOB_TIME);
	SetPlayerColor(playerid, COLOR_TWRED);
	SetPlayerToTeamColor(playerid);
	SendClientMessage(playerid, COLOR_WHITE, string);
	if(PlayerInfo[MAX_PLAYERS][pWantedLevel] <= 1)

	{
		WantedPoints[giveplayerid] += 6;

	}
	else if(PlayerInfo[MAX_PLAYERS][pWantedLevel] >= 2)

	{
		WantedPoints[giveplayerid] += 6;

	}
	SetPlayerCriminal(playerid, 999, "Bank Robbery");
	format(string, 256, "City Alert: The Los Santos Bank is being robbed!");
	SendClientMessageToAll(COLOR_LIGHTBLUE, string);
	BankJobTime = BANK_JOB_TIME;
	BankJobPlayer = playerid;
	return 1;

}
Reply
#2

you simply haven't defined any of the variables.
Reply
#3

Quote:
Originally Posted by park4bmx
Посмотреть сообщение
you simply haven't defined any of the variables.
How to make that
Reply
#4

i dont know what they do but example:
pawn Код:
new TimeAfterBankJob;
new BankJobPlayer;
new BankJobTime;
Again you need to assign them to what they should do!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)