15.05.2016, 04:57
Well i have question is continue and return 0; work same?
Like this i tried that
look like both function work same?
I know continue skip that thing and move to code at top where it start for next iteration.
and break can break the loop and don't stop execute data after that break.
But kindly difference between those.
return 1 between break?
and
return 0 between continue?
what is difference?
Код:
UnoccupiedVehicle(vehicleid) { foreach(Player, i) { if(IsPlayerInVehicle(i,vehicleid)) return 0; } return 1; }
Код:
UnoccupiedVehicle(vehicleid) { foreach(Player, i) { if(IsPlayerInVehicle(i,vehicleid)) continue; } return 1; }
I know continue skip that thing and move to code at top where it start for next iteration.
and break can break the loop and don't stop execute data after that break.
But kindly difference between those.
return 1 between break?
and
return 0 between continue?
what is difference?