SA-MP Forums Archive
error - 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)
+--- Thread: error (/showthread.php?tid=345267)



error - Burn_ - 24.05.2012

In this cmd,
Код:
CMD:kupizeton(playerid, params[])
	{
		if (IsPlayerInRangeOfPoint(playerid, 3,1023.6085,-889.9498,44.0966))
		{
			if(PlayerInfo[playerid][pZeton] == 3)
			{
				SendClientMessage(playerid, COLOR_GREY, "**Nemozete imati vese od 3 zetona!");
				return 1;
			}
			if(GetPlayerMoney(playerid) < 49)
	        {
         		SendClientMessage( playerid, COLOR_GREY, "**Nemate dovoljno novca zeton kosta 50$!");
         		return 1;
			}
			GivePlayerCash(playerid, -50)
			
			PlayerInfo[playerid][pZeton] += 1;
			SendClientMessage( playerid, COLOR_GREY, "**Mozete kupiti vise zetona, da se nebi vracali na kasu.");
	        SendClientMessage(playerid, COLOR_WHITE, "Kupili ste zeton.");
			return 1;
		}
		else
		{
			SendClientMessage(playerid, COLOR_GREY, "**Niste kod Kase za kupovinu zetona!");
			return 1;
		}
	}
I have a one error..

Код:
error 001: expected token: ";", but found "-identifier-"
That is this line:

Код:
PlayerInfo[playerid][pZeton] += 1;



Re: error - SuperViper - 24.05.2012

You forgot a ; on this line:

pawn Код:
GivePlayerCash(playerid, -50)
Also, instead of += 1, you can use ++.