Jump to content

Help tires,engine,tank parts DayZ


adi8908456

Recommended Posts

Hi!

I'm editing dayz gamemode to polish and i have an error "error: DayZ/inventoryOLD.lua776:attempt to compare number with nil"

I cant put engine,tire and tank parts to tent

I translate engine to Silnik tire to Opona and tank parts to Częsci paliwowe (polish language)

Pls help

script: LINE 11 is 776 in script

function onPlayerMoveItemOutOfInventory () 
if playerMovedInInventory then startRollMessage2("Inventory", "Abusing exploits will result in a ban!", 255, 22, 0 ) return end -- [iD:0000005 - Several grammar + spelling mistakes and typos] //L 
local itemName = guiGridListGetItemText ( gridlistItems["inventory"], guiGridListGetSelectedItem ( gridlistItems["inventory"] ), 1 ) 
    if getElementData(getLocalPlayer(),itemName) and getElementData(getLocalPlayer(),itemName) >= 1 then 
        if isPlayerInLoot() then 
            local isVehicle = getElementData(isPlayerInLoot(),"vehicle") 
            local isTent = getElementData(isPlayerInLoot(),"Namiot") 
            if isVehicle and not isTent then 
                local veh = getElementData(isPlayerInLoot(),"parent") 
                local Opona,engine,parts = getVehicleAddonInfos (getElementModel(veh)) 
                if itemName == "Opona" and (getElementData(isPlayerInLoot(),"Opona_inVehicle") or 0) < Opona  or itemName == "Silnik" and (getElementData(isPlayerInLoot(),"Silnik_inVehicle") or 0)  < engine or itemName == "Częsci paliwowe" and (getElementData(isPlayerInLoot(),"Częsci paliwowe_inVehicle") or 0) < parts then 
                    if itemName == "Częsci paliwowe" then itemName = "Parts" end 
                    triggerEvent("onPlayerMoveItemOutOFInventory",getLocalPlayer(),itemName.."_inVehicle",isPlayerInLoot()) 
                    playerMovedInInventory = true 
                    setTimer(function() 
                        playerMovedInInventory = false 
                    end,700,1) 
                elseif isToolbeltItem(itemName) then 
                    triggerEvent("onPlayerMoveItemOutOFInventory",getLocalPlayer(),itemName,isPlayerInLoot()) 
                    playerMovedInInventory = true 
                    setTimer(function() 
                        playerMovedInInventory = false 
                    end,700,1) 
                elseif getLootCurrentSlots(getElementData(getLocalPlayer(),"currentCol")) + getItemSlots(itemName) <= getLootMaxAviableSlots(isPlayerInLoot()) then 
                    triggerEvent("onPlayerMoveItemOutOFInventory",getLocalPlayer(),itemName,isPlayerInLoot()) 
                    playerMovedInInventory = true 
                    setTimer(function() 
                        playerMovedInInventory = false 
                    end,700,1) 
                else 
                    startRollMessage2("Inventory", "Ekwipunek jest pełen!", 255, 22, 0 ) 
                    return 
                end 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...