[Help] Errors
#1

Help Errors
(45127) : error 001: expected token: "-identifier-", but found "-integer value-"
(45129) : error 029: invalid expression, assumed zero


Код:
public BorrarGarage(garageid)
    {
	        new arquivo[64];
	        new string[128];
	        format(arquivo, sizeof(arquivo), "Garage%d.inc", garageid);
            if(!DOF2_FileExists(arquivo))
            {
                    printf("There is this GarageID.");
                    return 1;
            }
            else
            {
		              for(new i = 0; i < MAX_PLAYERS; i++)
                      {
                      for(new v = 0; v < MAX_VEHICLES; v++) //45127
                      {
                      if(garageid == GetVehicleVirtualWorld(v)-10) //45129
                      {
                      if(!IsPlayerInVehicle(i, v))
                      {
                      SetVehicleVirtualWorld(v, 0);
                      SetVehicleToRespawn(v);
                      }
                      }
                      }
                   	  for(new i = 0; i < MAX_PLAYERS; i++)
                      {
                      if(garageid == GetPlayerVirtualWorld(i)-10)
                	  {
                      if(GetPlayerState(i) == PLAYER_STATE_ONFOOT)
                      {
                      SetPlayerPos(i, Garage[garageid][cnX], Garage[garageid][cnY], Garage[garageid][cnZ]);
                      SetPlayerVirtualWorld(i, 0);
                      SetPlayerInterior(i, 0);
                      format(string, sizeof(string), "El garaje %d{00AB00} ha sido eliminado.", garageid);
                      SendClientMessage(i, COLOR_VERDE, string);
					  }
                      else
                      {
                      new tmpcar = GetPlayerVehicleID(i);
                      SetVehiclePos(tmpcar, Garage[garageid][cnX], Garage[garageid][cnY], Garage[garageid][cnZ]);
                      SetVehicleVirtualWorld(tmpcar, 0);
                      SetPlayerVirtualWorld(i, 0);
                      SetPlayerInterior(i, 0);
                      format(string, sizeof(string), "El garaje %d{00AB00} ha sido eliminado.", garageid);
		              SendClientMessage(i, COLOR_VERDE, string);
                      }
                      }
                      }
                      }
                   	  DOF2_RemoveFile(arquivo);
	                  Deletado[garageid] = true;
	                  Delete3DTextLabel(LabelSalida[garageid]);
	                  Delete3DTextLabel(LabelEntrada[garageid]);
	                  printf("Garage %d foi deletada", garageid);
	                  GuardarGarages();
            //}
            return 1;
    }
Thanks
Reply
#2

which is line 45127 and 45129 ?
Reply
#3

Код:
public BorrarGarage(garageid){
	new arquivo[64];
	new string[128];
	format(arquivo, sizeof(arquivo), "Garage%d.inc", garageid);
	if(!DOF2_FileExists(arquivo)){
		printf("There is this GarageID.");
		return 1;
	} else {
		for(new i = 0; i < MAX_PLAYERS; i++){
			for(new v = 0; v < MAX_VEHICLES; v++){
				if(garageid == GetVehicleVirtualWorld(v)-10){
					if(!IsPlayerInVehicle(i, v)){
						SetVehicleVirtualWorld(v, 0);
						SetVehicleToRespawn(v);
					}
				}
			}
			for(new i = 0; i < MAX_PLAYERS; i++){
				if(garageid == GetPlayerVirtualWorld(i)-10){
					if(GetPlayerState(i) == PLAYER_STATE_ONFOOT){
						SetPlayerPos(i, Garage[garageid][cnX], Garage[garageid][cnY], Garage[garageid][cnZ]);
						SetPlayerVirtualWorld(i, 0);
						SetPlayerInterior(i, 0);
						format(string, sizeof(string), "El garaje %d{00AB00} ha sido eliminado.", garageid);
						SendClientMessage(i, COLOR_VERDE, string);
					} else {
						new tmpcar = GetPlayerVehicleID(i);
						SetVehiclePos(tmpcar, Garage[garageid][cnX], Garage[garageid][cnY], Garage[garageid][cnZ]);
						SetVehicleVirtualWorld(tmpcar, 0);
						SetPlayerVirtualWorld(i, 0);
						SetPlayerInterior(i, 0);
						format(string, sizeof(string), "El garaje %d{00AB00} ha sido eliminado.", garageid);
						SendClientMessage(i, COLOR_VERDE, string);
					}
				}
			}
		}
		DOF2_RemoveFile(arquivo);
		Deletado[garageid] = true;
		Delete3DTextLabel(LabelSalida[garageid]);
		Delete3DTextLabel(LabelEntrada[garageid]);
		printf("Garage %d foi deletada", garageid);
		GuardarGarages();
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)