warning 215: expression has no effect
#1

Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
     if(strcmp(cmdtext,"/t")==0 && cmdtext[2]=='\0')
     {
          if(gCommandsDisabled[playerid]==true) <----------- something connected with the warning line
          {
                // Now show him the dialog
                return 1;
          }
     }
	 return 0;
}
Код:
CMD:SAMPLE
{
  gCommandsDisabled[playerid]==true; <------------------THIS IS THE WARNING. Im getting warning on this line
  return SendClientMessage(playerid, 0xFF0000FF, "The hell is that warning??");
}
Reply
#2

pawn Код:
if(strcmp(cmdtext,"/t",false)==0 && cmdtext[2]=='\0' )
pawn Код:
CMD:SAMPLE
{
  gCommandsDisabled[playerid]=true; <------------------THIS IS THE WARNING. Im getting warning on this line
  return SendClientMessage(playerid, 0xFF0000FF, "The hell is that warning??");
}
Reply
#3

pawn Код:
gCommandsDisabled[playerid] = true;
Reply
#4

Thanks for your response. Error fixed. But I can still used /t-teleport in /drag. I want to disabled /t command if someone use it in /drag area.
Reply
#5

It seems you asked me the same question in PM, I replied in PM.

PS: Never mind when I asked to make a topic of this, because you already have one . It seems Viniborn replied for the warning before me.
Reply
#6

pawn Код:
if(strcmp(cmdtext,"/t",false)==0 && cmdtext[2]=='\0' )
{
          if(gCommandsDisabled[playerid]) //Checks for true
          {
                // Now show him the dialog
                return 1;
          }
     }
     return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)