Posts: 1,939
Threads: 11
Joined: Oct 2015
Reputation:
0
i think you meant why the value is not increased on that if statement,right? if that's what you meant then here is the answer suffix ++ operator works like that it only get evaluated after the statement it involves get executed
Posts: 1,050
Threads: 153
Joined: Mar 2016
Reputation:
0
My question is.
SpeedWarnCount[MAX_PLAYERS char];
What's that char for?
And what will if(SpeedWarnCount{id}++) do?
Posts: 1,939
Threads: 11
Joined: Oct 2015
Reputation:
0
These are packed strings and uses less memory as compared to normal arrays (values between 0-255). They are accessed using {} as [] in normal arrays.
if(SpeedWarnCount{id}++)
checks SpeedWarnCount{id} is 0 or not then it increments it's value by 1
Posts: 1,939
Threads: 11
Joined: Oct 2015
Reputation:
0
that will work as else statement is not the else statement of the if we talked about as it was about vectorsize and the speedwarndcount will get increased too.
Posts: 1,050
Threads: 153
Joined: Mar 2016
Reputation:
0
Thanks for explaining that to me.