4 errors in one line
#1

i get 5 errors in this line

Код:
if((8 <= PlayerInfo[playerid][pMember] <= 10) || PlayerInfo[playerid][pFMember] < 255) || PlayerInfo[playerid][pMember] == 1) || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3) || PlayerInfo[playerid][pMember] == 4) || PlayerInfo[playerid][pMember] == 5) || PlayerInfo[playerid][pMember] == 6) PlayerInfo[playerid][pMember] == 7) || PlayerInfo[playerid][pMember] == 9) || PlayerInfo[playerid][pMember] == 11) || PlayerInfo[playerid][pMember] == 12) || PlayerInfo[playerid][pMember] <=13);
errors

Код:
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Reply
#2

Here is your fix:
pawn Код:
if(PlayerInfo[playerid][pMember] <= 10 || PlayerInfo[playerid][pFMember] < 255 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pMember] == 6 PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pMember] <= 13)
Problem:

You were adding a closing parentheses at the end of every number, where you were not opening one. So you were doing this:

(( ) ) ) ) ) ) ) ) ) ) - This is obviously wrong.

Second:

You never ever put ';' at the end of an 'if' statement.
Reply
#3

still i get same errors
Reply
#4

Quote:
Originally Posted by Mr.1337
Посмотреть сообщение
still i get same errors
From the same line? If you have teamviewer, PM me your ID and Pass.
Reply
#5

I don't really like people going into my PC.

And yes, same line
Reply
#6

pawn Код:
if(PlayerInfo[playerid][pMember] <= 10) || PlayerInfo[playerid][pFMember] < 255) || PlayerInfo[playerid][pMember] == 1) || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3) || PlayerInfo[playerid][pMember] == 4) || PlayerInfo[playerid][pMember] == 5) || PlayerInfo[playerid][pMember] == 6) PlayerInfo[playerid][pMember] == 7) || PlayerInfo[playerid][pMember] == 9) || PlayerInfo[playerid][pMember] == 11) || PlayerInfo[playerid][pMember] == 12) || PlayerInfo[playerid][pMember] <= 13);
Reply
#7

Quote:
Originally Posted by .FuneraL.
Посмотреть сообщение
pawn Код:
if(PlayerInfo[playerid][pMember] <= 10) || PlayerInfo[playerid][pFMember] < 255) || PlayerInfo[playerid][pMember] == 1) || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3) || PlayerInfo[playerid][pMember] == 4) || PlayerInfo[playerid][pMember] == 5) || PlayerInfo[playerid][pMember] == 6) PlayerInfo[playerid][pMember] == 7) || PlayerInfo[playerid][pMember] == 9) || PlayerInfo[playerid][pMember] == 11) || PlayerInfo[playerid][pMember] == 12) || PlayerInfo[playerid][pMember] <= 13)[B];[/B]
That will only cause errors.

Notice you put ';' at the end of that if statement. You cannot do that.

But, minus that ';' mistake, that is the same thing I did. He is obviously not doing something right.
Reply
#8

same errors
Reply
#9

Quote:
Originally Posted by Mr.1337
Посмотреть сообщение
same errors
Make sure that there is not a ';' at the end of that line...
Reply
#10

To make it clear:

Код:
if
(
8 <= PlayerInfo[playerid][pMember] <= 10
|| PlayerInfo[playerid][pFMember] < 255
|| PlayerInfo[playerid][pMember] == 1
|| PlayerInfo[playerid][pMember] == 2
|| PlayerInfo[playerid][pMember] == 3
|| PlayerInfo[playerid][pMember] == 4
|| PlayerInfo[playerid][pMember] == 5
|| PlayerInfo[playerid][pMember] == 6
|| PlayerInfo[playerid][pMember] == 7
|| PlayerInfo[playerid][pMember] == 9
|| PlayerInfo[playerid][pMember] == 11
|| PlayerInfo[playerid][pMember] == 12
|| PlayerInfo[playerid][pMember] <= 13
)
{
	//do something here.
}
Anyway, you can make it much more simple!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)