invalid expression, assumed zero
#4

Quote:
Originally Posted by BladeGamingYT
Посмотреть сообщение
thanks, btw what was the problem?
Because you used the wrong if-else;

Код:
COMMAND:cmdspy(playerid, params[])
{
	if(playerData[playerid][playerLevel] >= 6)
	{
		if(playerData[playerid][playercspy])
		{
			playerData[playerid][playercspy] = false;
			SendClientMessage(playerid, COLOR_WHITE, "{FFFF00}	You are now spying on commands.");
		}
		else
		{
			playerData[playerid][playercspy] = true;
			SendClientMessage(playerid, COLOR_WHITE, "{FFFF00}	You are no longer spying on commands.");
		}
		else
		{
			SendClientMessage(playerid, COLOR_RED, "You do not have correct permissions to use this command.");
		}
	}
	return 1;
}
Код:
COMMAND:cmdspy(playerid, params[])
{
	if(playerData[playerid][playerLevel] >= 6)
	{
		if(playerData[playerid][playercspy])
		{
			playerData[playerid][playercspy] = false;
			SendClientMessage(playerid, COLOR_WHITE, "{FFFF00}	You are now spying on commands.");
		}
		else
		{
			playerData[playerid][playercspy] = true;
			SendClientMessage(playerid, COLOR_WHITE, "{FFFF00}	You are no longer spying on commands.");
		}
	}
	else
	{
		SendClientMessage(playerid, COLOR_RED, "You do not have correct permissions to use this command.");
	}
	return 1;
}
Reply


Messages In This Thread
invalid expression, assumed zero - by BladeGamingYT - 14.10.2018, 15:07
Re: invalid expression, assumed zero - by Jensenn - 14.10.2018, 15:12
Re: invalid expression, assumed zero - by BladeGamingYT - 14.10.2018, 15:31
Re: invalid expression, assumed zero - by Jensenn - 15.10.2018, 12:16

Forum Jump:


Users browsing this thread: 1 Guest(s)