13.07.2014, 22:09
Help?
Here's my code:
Thanks in advance.
Here's my code:
pawn Код:
stock GetPlayerFakeFactionInfo(targetid, rank[64], employer[64])
{
switch (PlayerInfo[targetid][pFakeBadge]) // employer/rank/division data is pulled from here
{
case 1:
{
employer = "LSPD";
switch(PlayerInfo[targetid][pFakeRank])
{
case 0: rank = "Cadet";
case 1: rank = "Officer";
case 2: rank = "Senior Officer";
case 3: rank = "Sergeant";
case 4: rank = "Lieutenant";
case 5: rank = "Deputy Chief of Police";
case 6: rank = "Chief of Police";
default: rank = "Cadet";
}
}
case 2:
{
employer = "FBI";
switch(PlayerInfo[targetid][pFakeRank])
{
case 0: rank = "Intern";
case 1: rank = "Agent";
case 2: rank = "Senior Agent";
case 3: rank = "Special Agent";
case 4: rank = "Agent in Charge;
case 5: rank = "Deputy Director";
case 6: rank = "Director";
default: rank = "Intern";
}
}
case 3:
{
employer = "SASP";
switch(PlayerInfo[targetid][pFakeRank])
{
case 1: rank = "Officer";
case 2: rank = "Corporal";
case 3: rank = "Sergeant";
case 4: rank = "Lieutenant";
case 5: rank = "Captain";
case 6: rank = "Chief";
default: rank = "Cadet";
}
}
case 4:
{
employer = "FDSA";
switch(PlayerInfo[targetid][pFakeRank])
{
case 1: rank = "Paramedic";
case 2: rank = "Senior Paramedic";
case 3: rank = "Advanced Paramedic";
case 4: rank = "Captain";
case 5: rank = "Deputy Commissioner";
case 6: rank = "Commissioner";
default: rank = "Intermediate";
}
}
case 5:
{
employer ="Judicial System";
switch(PlayerInfo[targetid][pFakeRank])
{
case 1: rank = "Clerk of Court";
case 2: rank = "District Attorney";
case 3: rank = "District Judge";
case 4: rank = "Appellate Judge";
case 5: rank = "Associate Justice of the Supreme Court";
case 6: rank = "Chief Justice of the Supreme Court";
default: rank = "Clerk of Court";
}
}
case 6:
{
employer = "Government";
switch(PlayerInfo[targetid][pFakeRank])
{
case 1: rank = "Junior Staff";
case 2: rank = "General Staff";
case 3: rank = "Senior Staff";
case 4: rank = "Head of Staff";
case 5: rank = "Vice President";
case 6: rank = "President";
default: rank = "Junior Staff";
}
}
case 7:
{
employer = "SADPS";
switch(PlayerInfo[targetid][pFakeRank])
{
case 0: rank = "Corporal";
case 1: rank = "Corporal";
case 2: rank = "Sergent";
case 3: rank = "Lieutenant";
case 4: rank = "Captain";
case 5: rank = "Commander";
case 6: rank = "Sherriff";
default: rank = "Corporal";
}
}
case 9:
{
employer ="SANews";
switch(PlayerInfo[targetid][pFakeRank])
{
case 1: rank = "Local Reporter";
case 2: rank = "Local Editor";
case 3: rank = "Network Anchor";
case 4: rank = "Network Editor";
case 5: rank = "Asst. Network Producer";
case 6: rank = "Network Producer";
default: rank = "Intern";
}
}
case 11:
{
employer = "National Guard";
switch(PlayerInfo[targetid][pFakeRank])
{
case 0: rank= "Private";
case 1: rank = "Corporal";
case 2: rank = "Sergeant";
case 3: rank = "Lieutenant";
case 4: rank = "Captain";
case 5: rank = "Major";
case 6: rank = "General";
default: rank = "Private";
}
}
case 12:
{
employer = "NOOSE";
{
switch(PlayerInfo[targetid][pFakeRank])
{
case 0: rank = "Ensign";
case 1: rank = "Marksman";
case 2: rank = "Elite Marksman";
case 3: rank = "Operative";
case 4: rank = "Elite Operative";
case 5: rank = "Vice Commander";
case 6: rank = "Supreme Commander";
default: rank = "Ensign";
}
}
}
default: { employer = "None"; rank = "N/A"; }
}
return 1;
}
pawn Код:
C:\Users\Mike\Desktop\UGRP\gamemodes\UGRP.pwn(6451) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.