what's up with this warning ?
#1

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.
Reply
#2

if(IsCaptured[playerid] == 1) return SendClientMessage(playerid, YELLOW, "You can't escape now.");
Reply
#3

so next time I should use == instead of just = right ? or there's something else wrong ?
Reply
#4

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
Reply
#5

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
Reply
#6

how would I search if I didn't know what the problem was !?!
Reply
#7

Searching on ****** your warning!
or even on the forums!
Reply
#8

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.
Reply
#9

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)