Warning
#1

code

Код:
IsDsEnabled[playerid] == 0;
warning

Код:
warning 215: expression has no effect
Reply
#2

Setting a value must have a single =
A double = is for comparing.
Reply
#3

pawn Код:
IsDsEnabled[playerid] == 0;
Use this in an if.

pawn Код:
IsDsEnabled[playerid] = 0;
Use this when setting something.
Reply
#4

Quote:
Originally Posted by KinderClans
Посмотреть сообщение
pawn Код:
IsDsEnabled[playerid] == 0;
Use this in an if.

pawn Код:
IsDsEnabled[playerid] = 0;
Use this when setting something.
You don't use a semi-colon in an if statement do you? Please try not to give misleading information.
Reply
#5

Quote:
Originally Posted by KinderClans
Посмотреть сообщение
pawn Код:
IsDsEnabled[playerid] == 0;
Use this in an if.

pawn Код:
IsDsEnabled[playerid] = 0;
Use this when setting something.
What in the world are you even thinking?
pawn Код:
if(IsDsEnabled[playerid] == 0;)
will give an error.

O.P, you should use
pawn Код:
IsDsEnabled[playerid] = 1;
when you want to manipulate the value of the variable, and to compare it with another value/variable you have to use the IF statement this way with two equals:
pawn Код:
if(IsDsEnabled[playerid] == 1)
{
    // code here.
}
Reply
#6

Quote:
Originally Posted by MafiaOink
Посмотреть сообщение
What in the world are you even thinking?
pawn Код:
if(IsDsEnabled[playerid] == 0;)
will give an error.

O.P, you should use
pawn Код:
IsDsEnabled[playerid] = 1;
when you want to manipulate the value of the variable, and to compare it with another value/variable you have to use the IF statement this way with two equals:
pawn Код:
if(IsDsEnabled[playerid] == 1)
{
    // code here.
}
Zindabad, lol.
Reply
#7

Show where are you using it in code.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)