14.01.2014, 11:26
I made this stock, and it stalls out my compiler, I know its this specific code because I removed it and it worked.
Anyone have any insight as to why this is happening?
And if its the way the code is done, any help to clean it up would be appreciated.
P.S.
When the code only had the "Private" and "Specialist" Line in the beginning, it compiled.....
Anyone have any insight as to why this is happening?
And if its the way the code is done, any help to clean it up would be appreciated.
P.S.
When the code only had the "Private" and "Specialist" Line in the beginning, it compiled.....
pawn Код:
stock GetRankNameFromExp(playerid)
{
new rankname[120];
switch(PData[playerid][pExp])
{
case 0 .. 18500 rankname = "Private";
case 28000 .. 67999 rankname = "Specialist";
case 68000 .. 119999 rankname = "Corporal";
case 120000 .. 178999 rankname = "Sergeant";
case 179000 .. 246999 rankname = "Staff Sergeant";
case 247000 .. 322999 rankname = "Master Sergeant";
case 323000 .. 404999 rankname = "First Sergeant";
case 405000 .. 536999 rankname = "Warrant Officer";
case 537000 .. 831999 rankname = "Chief Warrant Officer";
case 832000 .. 1239999 rankname = "Second Lieutenant";
case 1240000 .. 1755999 rankname = "First Lieutenant";
case 1756000 .. 2379999 rankname = "Captain";
case 2380000 .. 31119999 rankname = "Major";
case 3112000 .. 3951999 rankname = "Lieutenant Colonel";
case 3952000 .. 4899999 rankname = "Colonel";
case 4900000 .. 5955999 rankname = "Brigadier General";
case 5956000 .. 6331999 rankname = "General";
case 6332000 .. 9999999 rankname = "General of the Army";
default rankname = "Private";
}
return rankname;
}