01.04.2016, 15:11
When I'm compiling this code, I'm getting "a variable is assigned to itself" errors on the marked lines. What's strange about this, is that I've been inverting booleans like this for ages and it has always worked before. Why isn't it working here though?
pawn Код:
enum seaded
{
sATMRaha,
bool:sBKanal,
bool:sOOCKanal,
}
new Seaded[seaded];
if (strfind(inputtext, "/o kanal", true) != -1)
{
Success(playerid, "/o kanal %s!", (Seaded[sOOCKanal] = !Seaded[sOOCKanal]) ? ("suletud") : ("avatud")); // error
UuendaSeaded();
ShowServerSettings(playerid);
}
else if (strfind(inputtext, "/b kanal", true) != -1)
{
Success(playerid, "/b kanal %s!", (Seaded[sBKanal] = !Seaded[sBKanal]) ? ("suletud") : ("avatud")); // error
UuendaSeaded();
ShowServerSettings(playerid);
}