20.12.2013, 18:13
well, the code is correct.
But this GetVehiclePrice looks rly ugly,
it might cause the code to stop (just guessin' this but it could be)
rewrite it, use switch instead of countless if statements
btw. the code will run faster too like this
Example:
also try leaving out one of the two functions in your format and try if it's working.
Like this, you might see what caused the code to stop
But this GetVehiclePrice looks rly ugly,
it might cause the code to stop (just guessin' this but it could be)
rewrite it, use switch instead of countless if statements
btw. the code will run faster too like this
Example:
Код:
forward GetVehiclePrice(vehicle); public GetVehiclePrice(vehicle) { new vehicleprice; switch(vehicle) { case 481: vehicleprice = 1200; case 531: vehicleprice = 36000; //and so on... default: vehicleprice = 0;// wwhen nothing matches } return vehicleprice; }
Like this, you might see what caused the code to stop