Cmd warning
#1

Hi everyone,

I created yesterday a command to go to any location, it works but I have a warning.

Код:
if(strcmp(cmd, "/go", true) == 0)
{
	new tmp[128];
	new tmp2[128];
	new tmp3[128];
	new tmp4[128];
	new tmp5[128];
		
	tmp = strtok(cmdtext, idx);
	tmp2 = strtok(cmdtext, idx);
	tmp3 = strtok(cmdtext, idx);
	tmp4 = strtok(cmdtext, idx);
	tmp5 = strtok(cmdtext, idx);

	if(!strlen(tmp)|| !strlen(tmp2)|| !strlen(tmp3)|| !strlen(tmp4)) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /go <Position X> <Position Y> <Position Z> <Position A> <Optional : Interior>");

	if(!strlen(tmp5)) {

    strlen(tmp5) == 0; // This is the warning...

	}

	SetPlayerPos(playerid, strval(tmp),strval(tmp2),strval(tmp3));
	SetPlayerFacingAngle(playerid, strval(tmp4));
	SetPlayerInterior(playerid, strval(tmp5));
	return 1;
}
This is the warning I get :

Код:
C:\Documents and Settings\URBAN\Bureau\samp02Xserver.win32\gamemodes\new.pwn(211) : warning 215: expression has no effect
Can anyone help me ?

Thanks.
Reply
#2

strlen(tmp5) == 0; should be -> strlen(tmp5) = 0;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)