Cmd warning - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Cmd warning (
/showthread.php?tid=78943)
Cmd warning -
urbanghetto - 24.05.2009
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.
Re: Cmd warning -
Correlli - 24.05.2009
strlen(tmp5) == 0; should be -> strlen(tmp5) = 0;