Robstore command wont work, please help.
#1

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
Reply
#2

What lines are the errors on
Reply
#3

You forgot some ' ; ' in your script.
Reply
#4

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.
Reply
#5

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?
Reply
#6

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)