18.01.2016, 02:54
It'll have something to do with the mixing of && and || on an if statement.
Maybe try breaking them up a bit.
if((VehInfo[somecar][VehFaction] != 0 && VehInfo[somecar][VehFaction] == AccInfo[playerid][PlayerFaction])|| VehInfo[somecar][VehFaction] == 0)
Not saying it'll work in the slightest, but it's always trouble with && and ||. You have to get that crap all perfect.
Another test maybe, is to make, before the if statement, a debug printf to the log, showing what the values actually are, when you are using this.
Use format, to make a string, and print the whole line out using printf.
Could also be beneficial to do individual if statements, if this won't work.
Maybe try breaking them up a bit.
if((VehInfo[somecar][VehFaction] != 0 && VehInfo[somecar][VehFaction] == AccInfo[playerid][PlayerFaction])|| VehInfo[somecar][VehFaction] == 0)
Not saying it'll work in the slightest, but it's always trouble with && and ||. You have to get that crap all perfect.
Another test maybe, is to make, before the if statement, a debug printf to the log, showing what the values actually are, when you are using this.
Use format, to make a string, and print the whole line out using printf.
Could also be beneficial to do individual if statements, if this won't work.