01.10.2012, 17:13
hello. i am getting a " invalid expression, assumed zero", on this code. on the last ELSE line.
could you please tell me whats wrong?
could you please tell me whats wrong?
Код:
{ new form[128]; new vehicle = GetPlayerVehicleID(i); new Float: Speed; Speed = GetSpeed(i); if(!OutOfFuel[i]) { if(Fuel[vehicle] <= 25) { if(EngineStatus[vehicle]) { if(Speed > 0) { format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~y~Motor a trabalhar.~n~~w~Combustivel:~g~ %d%~n~~r~Gdeposito na reserva. ",Fuel[vehicle],GetSpeedKM(i)); GameTextForPlayer(i,form,1000,5); } } else { format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~y~Motor a trabalhar.~n~~w~Combustivel:~g~ %d%~n~~r~deposito na reserva. ",Fuel[vehicle],GetSpeedKM(i)); GameTextForPlayer(i,form,1000,5); } } else { if(EngineStatus[vehicle]) { if(Speed > 0) { format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~y~Motor a trabalhar.~n~~w~Combustivel:~g~ %d%~n~~r~deposito na reserva. ",Fuel[vehicle],GetSpeedKM(i)); GameTextForPlayer(i,form,1000,5); } } else { format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~y~Motor a trabalhar.~n~~w~Combustivel:~g~ %d%~n~~r~deposito na reserva. ",Fuel[vehicle],GetSpeedKM(i)); GameTextForPlayer(i,form,1000,5); } //here else { format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~y~Motor desligado.~n~~w~Combustivel:~g~ %d% ",Fuel[vehicle],GetSpeedKM(i)); GameTextForPlayer(i,form,1000,5); } } } }