Jump to content

Dayz tank part


^_^ LOL ^_^

Recommended Posts

Posted (edited)

I try add tank part, by copying engine.

And i do all right im sure it.

but when i go in vehicle shows this

b3x1c2fwdspgaqehftz.png

And the 1360 line:

local w = dxGetTextWidth(parts.."/"..needparts.." Tank Parts",1.02,"default-bold") 

Thanks.

Edited by Guest
Posted

Thank you it works. But have another

ERROR: [DayZ-MTA]\DayZ\vehicle_spawns.lua:325: bad argument #2 to 'random' (number expected, got nil)

325 line:

setElementData(vehCol,"Parts_inVehicle",math.random(0,parts)) 

Posted

Where is 'parts' defined?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Then, as Castillo said, you'd have to tell us where parts is defined. Because the error means that 'parts' is not a number(which math.random needs), it is a nil value meaning it's nothing.

Yes, this is infact a signature.

Posted

Here it is, i think so.

setElementData(veh,"needparts",parts) 

if ((getElementData(col,"Parts_inVehicle") or 0) < tonumber(parts)) then 
    setVehicleEngineState ( veh, false ) 
    return 
end 

(getElementData(getElementData(veh,"parent"),"Parts_inVehicle") or 0) > tonumber(parts) 

Posted

I don't see 'parts' getting defined in the code you posted, you should post the whole thing.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I sent you a PM with a possible fix.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

  • 1 year later...

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...