Atouk Posted August 30, 2013 Posted August 30, 2013 Hola, que tal? Estoy trabajando en un proyecto de DayZ-Es que es la versión 100% en español y me tope con este error que estoy tratando de arreglar hace mucho tiempo que es el siguiente: ERROR: DayZ\survivorSystem_client.lua:1128: attempt to concatenate local 'needmotores' (a boolean value) Le cambie el nombre a todos los items, armas y demás cosas, solo tengo ese error que no me deja añadir el motor, ruedas y partes del motor a un vehículo diciendo 'No se puede dejar este item'. Eh cambiado las variables y todo lo demás probando y probando y no anda.. Espero que alguien me ayude ya que si puedo arreglar ese bug ahí nomas hosteo el servidor y si quieren pueden entrar. Muchísimas gracias!
Chaz-CR Posted August 30, 2013 Posted August 30, 2013 postea el script en el que esta esa linea asi te podemos ayudar!
Atouk Posted August 30, 2013 Author Posted August 30, 2013 local veh = getPedOccupiedVehicle(getLocalPlayer()) if veh then local maxfuel = getElementData(veh, "maxfuel") local fuel = getElementData(getElementData(veh, "parent"), "fuel") local needmotores = getElementData(veh, "needmotores") local needruedas = getElementData(veh, "needruedas") local needpartes = getElementData(veh, "needpartes") local motor = getElementData(getElementData(veh, "parent"), "Motor_inVehicle") or 0 local ruedas = getElementData(getElementData(veh, "parent"), "Rueda_inVehicle") or 0 local partes = getElementData(getElementData(veh, "parent"), "Parte_inVehicle") or 0 local offset = dxGetFontHeight(1.02, "default-bold") local w = dxGetTextWidth(motor .. "/" .. needmotores .. " Motor", 1.02, "default-bold") if motor == needmotores then r, g, b = 0, 255, 0 else r, g, b = 255, 0, 0 end dxDrawText(motor .. "/" .. needmotores .. " Motor", screenWidth * 0.5 - w / 2, screenHeight * 0, screenWidth * 0.5 - w / 2, screenHeight * 0, tocolor(r, g, b, 220), 1.02, "default-bold") local w = dxGetTextWidth(ruedas .. "/" .. needruedas .. " Ruedas", 1.02, "default-bold") if ruedas == needruedas then r, g, b = 0, 255, 0 else r, g, b = 255, 0, 0 end dxDrawText(ruedas .. "/" .. needruedas .. " Ruedas", screenWidth * 0.5 - w / 2, screenHeight * 0 + offset, screenWidth * 0.5 - w / 2, screenHeight * 0 + offset, tocolor(r, g, b, 220), 1.02, "default-bold") local w = dxGetTextWidth(partes .. "/" .. partes .. " Partes del Tanque", 1.02, "default-bold") if partes == partes then r, g, b = 0, 255, 0 else r, g, b = 255, 0, 0 end dxDrawText(partes .. "/" .. partes .. " Partes del Tanque", screenWidth * 0.5 - w / 2, screenHeight * 0 + offset * 2, screenWidth * 0.5 - w / 2, screenHeight * 0 + offset, tocolor(r, g, b, 220), 1.02, "default-bold") local w = dxGetTextWidth("Gasolina:" .. math.floor(fuel) .. "/" .. maxfuel, 1.02, "default-bold") if fuel == maxfuel then r, g, b = 0, 255, 0 elseif fuel < maxfuel / 10 then r, g, b = 255, 0, 0 elseif fuel < maxfuel / 4 then r, g, b = 255, 50, 0 elseif fuel < maxfuel / 3 then r, g, b = 200, 100, 0 elseif fuel < maxfuel / 2 then r, g, b = 125, 200, 0 elseif fuel < maxfuel / 1.5 then r, g, b = 50, 200, 0 end dxDrawText("Gasolina:" .. math.floor(fuel) .. "/" .. maxfuel, screenWidth * 0.5 - w / 2, screenHeight * 0 + offset * 3, screenWidth * 0.5 - w / 2, screenHeight * 0 + offset * 2, tocolor(r, g, b, 220), 1.02, "default-bold") end Sera por el local?
Chaz-CR Posted August 30, 2013 Posted August 30, 2013 Intenta solo cambiando el local al español y dejando los elementData como estaban, no se mucho de DayZ pero quizas use ese elementData en alguna otra funcion!
Atouk Posted August 30, 2013 Author Posted August 30, 2013 No entendi decis que ponga embes de local = locales? Explicate porfis
Atouk Posted August 30, 2013 Author Posted August 30, 2013 Sos un puto genio!, le saque lo de local y listo funciona!! Sos mi idolo estube tratando de arreglar esto como 1 mes gracias!!!!!!!!!
Recommended Posts