error help
#1

ok im using a race system and tried to give money and score point but im not that grea if If and else some help would be great.
Код:
			new winrar;//2617
			if(Ranking == 1)
			{
				winrar = Winnings1;
				GivePlayerScore(playerid, 250);
				EndingT = SetTimer("EndTimerR", 60000, false);
			}
			else if(Ranking == 2) winrar = Winnings2;
			GivePlayerScore(playerid, 100);
			else if(Ranking == 3) winrar = Winnings3;
			GivePlayerScore(playerid, 50);
			else if(Ranking == 4) winrar = Winnings4;
            GivePlayerScore(playerid, 25);
			else if(Ranking == 5) winrar = Winnings5;
			GivePlayerScore(playerid, 15);
			else if(Ranking > 5) winrar = RunnerUp;
			GivePlayerScore(playerid, 5);
			GivePlayerMoney(playerid, winrar);
			/*if(Ranking == 1) GivePlayerXp(playerid, 5);
			else if(Ranking == 2) GivePlayerXp(playerid, 4);
			else if(Ranking == 3) GivePlayerXp(playerid, 3);
			else if(Ranking == 4) GivePlayerXp(playerid, 2);
			else if(Ranking == 5) GivePlayerXp(playerid, 1);*/
			format(iString,sizeof(iString),"You have earned $%d from the race!",winrar);
			SendClientMessage(playerid,COLOUR_GREEN,iString);//2641
Код:

C:\Users\GTA ONLY\My Samp Server\filterscripts\Race.pwn(2626) : error 029: invalid expression, assumed zero
C:\Users\GTA ONLY\My Samp Server\filterscripts\Race.pwn(2626) : warning 215: expression has no effect
C:\Users\GTA ONLY\My Samp Server\filterscripts\Race.pwn(2626) : error 001: expected token: ";", but found "if"
C:\Users\GTA ONLY\My Samp Server\filterscripts\Race.pwn(2628) : error 029: invalid expression, assumed zero
C:\Users\GTA ONLY\My Samp Server\filterscripts\Race.pwn(2628) : warning 215: expression has no effect
C:\Users\GTA ONLY\My Samp Server\filterscripts\Race.pwn(2628) : error 001: expected token: ";", but found "if"
C:\Users\GTA ONLY\My Samp Server\filterscripts\Race.pwn(2630) : error 029: invalid expression, assumed zero
C:\Users\GTA ONLY\My Samp Server\filterscripts\Race.pwn(2630) : warning 215: expression has no effect
C:\Users\GTA ONLY\My Samp Server\filterscripts\Race.pwn(2630) : error 001: expected token: ";", but found "if"
C:\Users\GTA ONLY\My Samp Server\filterscripts\Race.pwn(2632) : error 029: invalid expression, assumed zero
C:\Users\GTA ONLY\My Samp Server\filterscripts\Race.pwn(2632) : warning 215: expression has no effect
C:\Users\GTA ONLY\My Samp Server\filterscripts\Race.pwn(2632) : error 001: expected token: ";", but found "if"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


8 Errors.
Many thanks
Reply
#2

Fixed.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)