12.10.2012, 03:21
Well..I tried to make a command which tells player rank.
So can you tell whats wrong with the code ? and solve it too ? Thanks
Error is
C:\Documents and Settings\gaurav\Desktop\my TDM\filterscripts\admin.pwn(2712) : error 029: invalid expression, assumed zero
So can you tell whats wrong with the code ? and solve it too ? Thanks
pawn Код:
CMD:myrank(playerid,params[])
{
new rank[128];
if(Kills[playerid]<10){rank = "Newbie Shooter";}
if(Kills[playerid]<25 && Kills[playerid]>=10) {rank = "Killer Shooter";}
if(Kills[playerid]<75 && Kills[playerid]>=25 {rank = "Master Shooter";}
if(Kills[playerid]<150 && Kills[playerid]>=300) {rank = "Pro Shooter";}
if(Kills[playerid]<300 && Kills[playerid]>=450) {rank = "Striker Shooter";}
if(Kills[playerid]<450 && Kills[playerid]>= 675) {rank = "Freekill Shooter";}
if(Kills[playerid]<675 && Kills[playerid]>= 1000) {rank = "Psycho Shooter";}
if(Kills[playerid]<1000 && Kills[playerid]>= 1500) {rank = "Fatal Shooter";}
if(Kills[playerid]<1500 && Kills[playerid]>= 2250){rank = "Havoc Shooter";}
if(Kills[playerid]<2250 && Kills[playerid]>= 3375) {rank = "Extreme Shooter";}
if(Kills[playerid]<3375 && Kills[playerid]>= 5100) {rank = "Wild Shooter";}
if(Kills[playerid]<5100 && Kills[playerid]>= 7650) {rank = "Hazardous Shooter";}
if(Kills[playerid]<7650 && Kills[playerid]>= 11475) {rank = "IGI Shooter";}
if(Kills[playerid]<11475 && Kills[playerid]>= 17500) {rank = "Tactical Shooter";}
if(Kills[playerid]<17500 && Kills[playerid]>= 26250) {rank = "Dedicated Shooter";}
if(Kills[playerid]<26250 && Kills[playerid]>= 39375) {rank = "Insane Shooter";}
if(Kills[playerid]<39375 && Kills[playerid]>= 60000) {rank = "Real Shooter";}
if(Kills[playerid]<60000 && Kills[playerid]>= 100000) {rank = "Professional Shooter";}
if(Kills[playerid]> 100000) {rank = "Rockstar Shooter";}
new string[500];
format(string, sizeof(string), "{FFFFFF}Rank:%s", rank);
ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"{FF0000}YOUR STATS:",string,"OK","");
return 1;
}
C:\Documents and Settings\gaurav\Desktop\my TDM\filterscripts\admin.pwn(2712) : error 029: invalid expression, assumed zero