SA-MP Forums Archive
warning 215: expression has no effect - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: warning 215: expression has no effect (/showthread.php?tid=359577)



warning 215: expression has no effect - kbalor - 14.07.2012

Код:
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??");
}



Re: warning 215: expression has no effect - [MM]RoXoR[FS] - 14.07.2012

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??");
}



Re: warning 215: expression has no effect - ViniBorn - 14.07.2012

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



Re: warning 215: expression has no effect - kbalor - 14.07.2012

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.


Re : warning 215: expression has no effect - lelemaster - 16.07.2012

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.


Re: warning 215: expression has no effect - [MM]RoXoR[FS] - 16.07.2012

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;
}