Pawn one warning [Different]
#1

Hi. Pawn Compiler different one warning. :/ What is the problem
Код:
new bool:WaitFunction[MAX_PLAYERS];
if(WaitFunction[playerid] = !WaitFunction[playerid])
{
/*     Do Stuff(Codes)     */
}
return 1;
}
PHP код:
warning 211possibly unintended assignment 
Reply
#2

check your code:

PHP код:
new bool:WaitFunction[MAX_PLAYERS];
if(
WaitFunction[playerid] == (!WaitFunction[playerid]))
{
/*     Do Stuff(Codes)     */
    
return 1;

Reply
#3

Код:
if(WaitFunction[playerid] = !WaitFunction[playerid])
to
Код:
if(WaitFunction[playerid] == !WaitFunction[playerid])
Character = is to assign new value to variable, while == is to compare if two variables are equal.

[EDIT]zSuYaNw bet me to it :P
Reply
#4

Try this:
PHP код:
if(WaitFunction[playerid] == !WaitFunction[playerid]) 
Reply
#5

This condition is still pointless :P
Reply
#6

PHP код:
if(!WaitFunction[playerid]) 
I guess that's what are you looking for.
Reply
#7

Код:
if(WaitFunction[playerid] == !WaitFunction[playerid])
Reply
#8

Thanks everyone !!
only 1 equals, inattention :/
Reply
#9

Toggling and checking directly if the condition is true will have to be:
Код:
if((WaitFunction[playerid] = !WaitFunction[playerid]))
Reply
#10

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Toggling and checking directly if the condition is true will have to be:
Код:
if((WaitFunction[playerid] = !WaitFunction[playerid]))
I guess I'm looking for this, thank you sir !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)