[HELP ME!] Rob Bank Command.
#1

Hello, I am not very good at scripting with this...
So I would like some help.
Tell me why this isn't working, and show me how I can get it to work.

Код:
  if(strcmp(cmd, "/robbank", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(PlayerInfo[playerid][pLocal] == 103 || PlayerToPoint(1.5, playerid, 1346.5016,-1758.7649,13.5156) || PlayerToPoint(1.5, playerid, 1592.7152,-2335.3748,13.5400) || PlayerToPoint(1.5, playerid, 2308.4612,-1634.4176,14.8270) || PlayerToPoint(1.5, playerid, 2865.9014,-1415.4203,11.0061) || PlayerToPoint(1.5, playerid, 2404.5913,-1229.8973,23.8301) || PlayerToPoint(1.5, playerid, 1172.5912,-1328.4365,15.4034))
	    {
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_GRAD2, "You have 5 seconds before the cops are alerted.");
				SetTimer("RobBankCop", 50000, 0);
				}
					SendClientMessageToAll(COLOR_RED, "!!!!!!THE BANK IS IN DISTRESS!!!!!!");
					SafeGivePlayerMoney(playerid, 1000000);
					GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
						{
  						SendClientMessageToAll(COLOR_RED, "!!!!!!THE BANK IS IN DISTRESS!!!!!!");
          		SendClientMessageToAll(COLOR_RED, "!!!!!!THE BANK IS IN DISTRESS!!!!!!");
          		SendClientMessageToAll(COLOR_RED, "!!!!!!THE BANK IS IN DISTRESS!!!!!!");
          		SendClientMessageToAll(COLOR_RED, "!!!!!!THE BANK IS IN DISTRESS!!!!!!");
          		SendClientMessageToAll(COLOR_RED, "!!!!!!THE BANK IS IN DISTRESS!!!!!!");
Here's the error Message

Код:
C:\Documents and Settings\HP_Administrator\Desktop\Server\filterscripts\robbank.pwn(15) : error 010: invalid function or declaration
C:\Documents and Settings\HP_Administrator\Desktop\Server\filterscripts\robbank.pwn(15 -- 3) : error 010: invalid function or declaration
C:\Documents and Settings\HP_Administrator\Desktop\Server\filterscripts\robbank.pwn(15 -- 5) : error 010: invalid function or declaration
C:\Documents and Settings\HP_Administrator\Desktop\Server\filterscripts\robbank.pwn(15 -- 8) : error 010: invalid function or declaration
C:\Documents and Settings\HP_Administrator\Desktop\Server\filterscripts\robbank.pwn(15 -- 11) : error 010: invalid function or declaration
C:\Documents and Settings\HP_Administrator\Desktop\Server\filterscripts\robbank.pwn(15 -- 12) : error 054: unmatched closing brace ("}")
C:\Documents and Settings\HP_Administrator\Desktop\Server\filterscripts\robbank.pwn(15 -- 14) : error 010: invalid function or declaration
C:\Documents and Settings\HP_Administrator\Desktop\Server\filterscripts\robbank.pwn(15) : error 010: invalid function or declaration
C:\Documents and Settings\HP_Administrator\Desktop\Server\filterscripts\robbank.pwn(15) : error 010: invalid function or declaration
C:\Documents and Settings\HP_Administrator\Desktop\Server\filterscripts\robbank.pwn(15 -- 18) : error 010: invalid function or declaration
C:\Documents and Settings\HP_Administrator\Desktop\Server\filterscripts\robbank.pwn(15 -- 18) : fatal error 107: too many error messages on one line

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


11 Errors.
Reply
#2

Please?
Reply
#3

show us more!
Reply
#4

Show the whole command and also what lines are what.
Reply
#5

1. Why you check if the player is connected? When the player isn't connected he can't even execute /robbank.
2. You actually say it takes 5 seconds before the cops get known of it, but you set the timer to 50 seconds.

I know that this doesn't fix the bugs you gave us, but this helps you in some way I hope.
Reply
#6

Код:
  if(strcmp(cmd, "/robbank", true) == 0)
  {
	  if(PlayerInfo[playerid][pLocal] == 103 || PlayerToPoint(1.5, playerid, 1346.5016,-1758.7649,13.5156) || PlayerToPoint(1.5, playerid, 1592.7152,-2335.3748,13.5400) || PlayerToPoint(1.5, playerid, 2308.4612,-1634.4176,14.8270) || PlayerToPoint(1.5, playerid, 2865.9014,-1415.4203,11.0061) || PlayerToPoint(1.5, playerid, 2404.5913,-1229.8973,23.8301) || PlayerToPoint(1.5, playerid, 1172.5912,-1328.4365,15.4034))
   	{
		 	tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_GRAD2, "You have 5 seconds before the cops are alerted.");
				SetTimer("RobBankCop", 50000, 0);
				{
					SendClientMessageToAll(COLOR_RED, "!!!!!!THE BANK IS IN DISTRESS!!!!!!");
					SafeGivePlayerMoney(playerid, 1000000);
					GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
					(
						SendClientMessageToAll(COLOR_RED, "!!!!!!THE BANK IS IN DISTRESS!!!!!!");
  					SendClientMessageToAll(COLOR_RED, "!!!!!!THE BANK IS IN DISTRESS!!!!!!");
  					SendClientMessageToAll(COLOR_RED, "!!!!!!THE BANK IS IN DISTRESS!!!!!!");
  					SendClientMessageToAll(COLOR_RED, "!!!!!!THE BANK IS IN DISTRESS!!!!!!");
  					SendClientMessageToAll(COLOR_RED, "!!!!!!THE BANK IS IN DISTRESS!!!!!!");
  					{
					{
				{
			{
		{
	{
	return 1;
 }
There...please help me.
Reply
#7

Quote:
Originally Posted by beatsiedude
Посмотреть сообщение
Код:
  if(strcmp(cmd, "/robbank", true) == 0)
  {
	  if(PlayerInfo[playerid][pLocal] == 103 || PlayerToPoint(1.5, playerid, 1346.5016,-1758.7649,13.5156) || PlayerToPoint(1.5, playerid, 1592.7152,-2335.3748,13.5400) || PlayerToPoint(1.5, playerid, 2308.4612,-1634.4176,14.8270) || PlayerToPoint(1.5, playerid, 2865.9014,-1415.4203,11.0061) || PlayerToPoint(1.5, playerid, 2404.5913,-1229.8973,23.8301) || PlayerToPoint(1.5, playerid, 1172.5912,-1328.4365,15.4034))
   	{
		 	tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_GRAD2, "You have 5 seconds before the cops are alerted.");
				SetTimer("RobBankCop", 50000, 0);
				{
					SendClientMessageToAll(COLOR_RED, "!!!!!!THE BANK IS IN DISTRESS!!!!!!");
					SafeGivePlayerMoney(playerid, 1000000);
					GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
					(
						SendClientMessageToAll(COLOR_RED, "!!!!!!THE BANK IS IN DISTRESS!!!!!!");
  					SendClientMessageToAll(COLOR_RED, "!!!!!!THE BANK IS IN DISTRESS!!!!!!");
  					SendClientMessageToAll(COLOR_RED, "!!!!!!THE BANK IS IN DISTRESS!!!!!!");
  					SendClientMessageToAll(COLOR_RED, "!!!!!!THE BANK IS IN DISTRESS!!!!!!");
  					SendClientMessageToAll(COLOR_RED, "!!!!!!THE BANK IS IN DISTRESS!!!!!!");
  					{
					{
				{
			{
		{
	{
	return 1;
 }
There...please help me.
are you kidding me ?? you open {{{{{{{ when you have to close it }}}}}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)