help with warning 206
#4

This is the code in full when i do it with the warnings


Код:
if(strcmp(cmd, "/government", true) == 0 || strcmp(cmd, "/gov", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
            if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 10,1)
			{
				if(PlayerInfo[playerid][pRank] != 1)
				{
				    SendClientMessage(playerid, COLOR_GREY, "(ERROR) Only the leader can use this");
				    return 1;
				}
				new length = strlen(cmdtext);
				while ((idx < length) && (cmdtext[idx] <= ' '))
				{
					idx++;
				}
				new offset = idx;
				new result[64];
				while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
				{
					result[idx - offset] = cmdtext[idx];
					idx++;
				}
				result[idx - offset] = EOS;
				if(!strlen(result))
				{
					SendClientMessage(playerid, COLOR_WHITE, "(USAGE) [/gov]ernment [text]");
					return 1;
				}
				if(CopOnDuty[playerid])
				{
					new faction = PlayerInfo[playerid][pFaction];
					SendClientMessageToAll(COLOR_GREEN, "|_________ Government Announcement _________|");
					format(string, sizeof(string), "%s %s: %s", DynamicFactions[faction][fRank1],GetPlayerNameEx(playerid), result);
					SendClientMessageToAll(COLOR_LIGHTRED, string);
					SendClientMessageToAll(COLOR_GREEN, "|_________ Government Announcement _________|");
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "(ERROR) You are not on duty");
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "(ERROR) Invalid faction");
			}
		}
		return 1;
	}
Reply


Messages In This Thread
help with warning 206 - by mtywe - 26.11.2010, 21:26
Re: help with warning 206 - by Bessensap - 26.11.2010, 21:35
Re: help with warning 206 - by mtywe - 26.11.2010, 21:39
Re: help with warning 206 - by mtywe - 26.11.2010, 21:41
Re: help with warning 206 - by ExEx - 26.11.2010, 21:43
Re: help with warning 206 - by mtywe - 26.11.2010, 21:46
Re: help with warning 206 - by ExEx - 27.11.2010, 08:06
Re: help with warning 206 - by mtywe - 27.11.2010, 15:15

Forum Jump:


Users browsing this thread: 1 Guest(s)