09.04.2018, 13:00
Remove the else and put a break; inside the if
Because the loop starts at 0 and if you are in the second or third or any other car, the id of the vehicle won't be equal with sfpdcar[i] which will be sfpdcar[0] first of the time so it will move to the else then to the return which you added and then stop the loop if I am not wrong
you can add another if(i == sizeof(sfpdcar) then throw the error message because the loop reached the end without displaying the mdc
Because the loop starts at 0 and if you are in the second or third or any other car, the id of the vehicle won't be equal with sfpdcar[i] which will be sfpdcar[0] first of the time so it will move to the else then to the return which you added and then stop the loop if I am not wrong
you can add another if(i == sizeof(sfpdcar) then throw the error message because the loop reached the end without displaying the mdc