[HELP] Department radio error. -
Код:
LINE= 6009 if(strcmp(cmd, "/departments", true) == 0 || strcmp(cmd, "/d", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new string[350];
GetPlayerName(playerid, pname, sizeof(pname));
GiveNameSpace(pname);
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' ')) {
idx++;
}
new offset = idx;
new result[255];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result)) {
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/f)action [faction chat]");
return 1;
}
if(UserInfo[playerid][uFaction] != 1 // PD
{
if(UserInfo[playerid][uRank] == 10) { format(string, sizeof(string), "** Deputy Chief %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 9) { format(string, sizeof(string), "** Captain %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 8) { format(string, sizeof(string), "** Lead Detective %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 7) { format(string, sizeof(string), "** Detective %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 6) { format(string, sizeof(string), "** Lead Lieutenant %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 5) { format(string, sizeof(string), "** Lieutenant %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 4) { format(string, sizeof(string), "** Sergeant %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 3) { format(string, sizeof(string), "** PO II %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 2) { format(string, sizeof(string), "** PO I %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 1) { format(string, sizeof(string), "** Cadet %s: %s, over. **", pname, result); }
else
{
format(string, sizeof(string), "** Officer %s: %s, over. **", pname, result);
}
SendClientMessage(playerid, COLOR_ALLDEPT, string)
return 1;
} // if(UserInfo[playerid][uFaction] != 1 && UserInfo[playerid][uFaction] != 3) {
else if(UserInfo[playerid][uFaction] != 2 // FD
{
if(UserInfo[playerid][uRank] == 10) { format(string, sizeof(string), "** Deputy Chief %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 9) { format(string, sizeof(string), "** Captain %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 8) { format(string, sizeof(string), "** Lead Detective %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 7) { format(string, sizeof(string), "** Detective %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 6) { format(string, sizeof(string), "** Lead Lieutenant %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 5) { format(string, sizeof(string), "** Lieutenant %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 4) { format(string, sizeof(string), "** Sergeant %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 3) { format(string, sizeof(string), "** PO II %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 2) { format(string, sizeof(string), "** PO I %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 1) { format(string, sizeof(string), "** Cadet %s: %s, over. **", pname, result); }
else
{
format(string, sizeof(string), "** Intern %s: %s, over. **", pname, result);
}
SendClientMessage(playerid, COLOR_ALLDEPT, string);
return 1;
}
else if(UserInfo[playerid][uFaction] != 3 // DOC
{
if(UserInfo[playerid][uRank] == 10) { format(string, sizeof(string), "** Deputy Chief %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 9) { format(string, sizeof(string), "** Captain %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 8) { format(string, sizeof(string), "** Lead Detective %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 7) { format(string, sizeof(string), "** Detective %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 6) { format(string, sizeof(string), "** Lead Lieutenant %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 5) { format(string, sizeof(string), "** Lieutenant %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 4) { format(string, sizeof(string), "** Sergeant %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 3) { format(string, sizeof(string), "** PO II %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 2) { format(string, sizeof(string), "** PO I %s: %s, over. **", pname, result); }
else if(UserInfo[playerid][uRank] == 1) { format(string, sizeof(string), "** Cadet %s: %s, over. **", pname, result); }
{
format(string, sizeof(string), "** Private %s: %s, over. **", pname, result);
}
SendClientMessage(playerid, COLOR_ALLDEPT, string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED,"ERROR: You are not part of a Team!");
return 1;
}
}
return true;
LINE = 6093 }
Re: [HELP] Department radio error. -
C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(6032) : error 029: invalid expression, assumed zero
C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(6051) : error 029: invalid expression, assumed zero
C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(6070) : error 029: invalid expression, assumed zero
C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(6093) : warning 217: loose indentation
correct the identation of your code, or simply add #pragma tabsize 0 after defines in your script.