what's up with this 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: what's up with this warning ? (
/showthread.php?tid=195220)
what's up with this warning ? -
marinov - 01.12.2010
pawn Код:
if(strcmp(cmdtext,"/unstuck", true) == 0)
{
if(IsCaptured[playerid] = 1) return SendClientMessage(playerid, YELLOW, "You can't escape now."); //this is the line
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid,GREEN,"Unstuck.");
return 1;
}
Warning :
pawn Код:
C:\Users\Marino Varesio\Desktop\zombie outbreak\gamemodes\Zombie_Outbreak_Original.pwn(1585) : warning 211: possibly unintended assignment
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.
AW: what's up with this warning ? -
am0k - 01.12.2010
if(IsCaptured[playerid] == 1) return SendClientMessage(playerid, YELLOW, "You can't escape now.");
Re: what's up with this warning ? -
marinov - 01.12.2010
so next time I should use == instead of just = right ? or there's something else wrong ?
AW: what's up with this warning ? -
am0k - 01.12.2010
correct
nothing else wrong
unintened assignment means: it thinks you want to set it to 1.
but you want to check if its 1
you could also check if its not 1 with != 1
Re: what's up with this warning ? -
6d - 01.12.2010
Marinov, have you searched this time?
have you even read pawn-lang.pdf?
it's exactly there!
Please, next time search!
Yes, you MUST use == to compare things and = to declare things.
Matthew "
6d" Larrabure
Re: what's up with this warning ? -
marinov - 01.12.2010
how would I search if I didn't know what the problem was !?!
Re: what's up with this warning ? -
6d - 01.12.2010
Searching on ****** your warning!
or even on the forums!
Re: what's up with this warning ? -
[UF]Ultimate - 01.12.2010
Quote:
Originally Posted by 6d
Searching on ****** your warning!
or even on the forums!
|
The problem has been solved, there really was no point in you replying just to criticize the method in which he gets answers for his problem.
Re: what's up with this warning ? -
6d - 01.12.2010
Quote:
Originally Posted by [UF]Ultimate
The problem has been solved, there really was no point in you replying just to criticize the method in which he gets answers for his problem.
|
I'm clarifying he breaked a rule, which is searching before posting.