[HELP] Department radio error.
#1

Код:
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	}
ERRORS=
Код:
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(6048) : error 001: expected token: ";", but found "return"
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
C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(10101) : warning 204: symbol is assigned a value that is never used: "mixa5"
C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(10100) : warning 204: symbol is assigned a value that is never used: "mixa4"
C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(10096) : warning 204: symbol is assigned a value that is never used: "mix5"
C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(10095) : warning 204: symbol is assigned a value that is never used: "mix4"
C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(14383) : warning 203: symbol is never used: "playerid"
C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(15153) : warning 203: symbol is never used: "QuestionInfo"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#2

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(604 : error 001: expected token: ";", but found "return"
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

if(UserInfo[playerid][uFaction] != 1) // PD
else if(UserInfo[playerid][uFaction] != 2)
else if(UserInfo[playerid][uFaction] != 3) // DOC

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)