SA-MP Forums Archive
Robstore command wont work, please help. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Robstore command wont work, please help. (/showthread.php?tid=239527)



Robstore command wont work, please help. - tomekr10 - 13.03.2011

I am trying to make a timer so you can only rob every 20 minutes or so...and it always comes up with errors

Код:
command(robstore, playerid, params[])
{
#pragma unused RobSt
    if(IsPlayerInRangeOfPoint(playerid, 3,252.249,-56.554,0.755))
    {
  		new sendername[MAX_PLAYER_NAME];
  		new string [200];
  		GetPlayerName(playerid, sendername, sizeof(sendername))
  		new robmoney = random(20000);
  		SendClientMessage(playerid, 0xFF0000FF, " You have started to rob the Liquor Store. ");
  		SendClientMessageToAll(RED, "The Liquer Store in Blueberry is being robbed! ALL Police units respand immediately!");
  		SendClientMessage(playerid, YELLOW, "You have been seen on the security cameras! Run away!");
  		format(string, sizeof(string), "** You have successfully stolen $%d!",robmoney);
		SendClientMessage(playerid,YELLOW,string);
		GivePlayerMoney(playerid, robmoney);
		Player[playerid][Money] += robmoney;
		}
		if(RobSt == (true))
		{
			SetTimer("RobSt",12000000,false);
		}
	return 1;
}
Код:
C:\Users\Alice\Desktop\Samp Server\gamemodes\VortexRoleplay.pwn(24) : error 001: expected token: ";", but found "forward"
C:\Users\Alice\Desktop\Samp Server\gamemodes\VortexRoleplay.pwn(2736) : error 076: syntax error in the expression, or invalid function call
C:\Users\Alice\Desktop\Samp Server\gamemodes\VortexRoleplay.pwn(2736) : warning 215: expression has no effect
C:\Users\Alice\Desktop\Samp Server\gamemodes\VortexRoleplay.pwn(12526) : error 001: expected token: ";", but found "new"
C:\Users\Alice\Desktop\Samp Server\gamemodes\VortexRoleplay.pwn(12527) : error 001: expected token: ";", but found "-identifier-"
C:\Users\Alice\Desktop\Samp Server\gamemodes\VortexRoleplay.pwn(12535) : warning 217: loose indentation
C:\Users\Alice\Desktop\Samp Server\gamemodes\VortexRoleplay.pwn(12535) : error 076: syntax error in the expression, or invalid function call
C:\Users\Alice\Desktop\Samp Server\gamemodes\VortexRoleplay.pwn(12539) : warning 217: loose indentation
C:\Users\Alice\Desktop\Samp Server\gamemodes\VortexRoleplay.pwn(26466) : warning 203: symbol is never used: "steal"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Also If someone could please tell me how to make a timer so that the robbey will last 2 minutes that would be great...(or make me one) please. Please HELP


Re: Robstore command wont work, please help. - BizzyD - 13.03.2011

What lines are the errors on


Re: Robstore command wont work, please help. - Serbish - 13.03.2011

You forgot some ' ; ' in your script.


Re: Robstore command wont work, please help. - BizzyD - 13.03.2011

Quote:
Originally Posted by Serbish
Посмотреть сообщение
You forgot some ' ; ' in your script.
Correct!

Goto all lines where the errors say:
Код:
expected token: ";
and add a ; on the end of them.


Re: Robstore command wont work, please help. - tomekr10 - 14.03.2011

Quote:
Originally Posted by AlexzzPro
Посмотреть сообщение
Correct!

Goto all lines where the errors say:
Код:
expected token: ";
and add a ; on the end of them.
i did go thru all of the lines and the ; is there

And also...how do I make a timer?


Re: Robstore command wont work, please help. - Marricio - 14.03.2011

pawn Код:
SetTimerEx("TimerName",1*1000,true,"i",playerid);
That will start a timer and when the 1 second passes it will do the same timer again cause there is 'true'. If you want it to call it 1 time put true.