09.02.2012, 21:09
It just makes it a lot clearer. I read it like this:
command /refuel
if they aren't in a vehicle, show an error
if already refueling, show error
loop through the gas stations
if they aren't near this gas station or this buisness isn't a gas station, continue to the next buisness ID
didn't continue, this is a gas station, refuel here and return 1;
end of loop
refueling failed, they are not near a gas station, show message
It just seems strange to have the if() on one line and the statement 50 lines away.
command /refuel
if they aren't in a vehicle, show an error
if already refueling, show error
loop through the gas stations
if they aren't near this gas station or this buisness isn't a gas station, continue to the next buisness ID
didn't continue, this is a gas station, refuel here and return 1;
end of loop
refueling failed, they are not near a gas station, show message
It just seems strange to have the if() on one line and the statement 50 lines away.