Solved Custom engine lua problem

Discussion in 'Mod Support' started by ItsTheLittleAcura!, May 9, 2019.

  1. ItsTheLittleAcura!

    ItsTheLittleAcura!
    Expand Collapse

    Joined:
    Feb 9, 2018
    Messages:
    116
    I'm trying to replicate the infamous L62 (has anyone ever heard about the V-8-6-4 fiasco?) Cadillac engine to include in an '80s full-size Bruckell mod that I'm making. I had to reprogram the engine lua to make this possible, and I have several variables to simulate what cylinder deactivation does. I get an error message in the console when I try to load the vehicle:
    30.04727|E|libbeamng.Lua.Exception|vehicles/oldsfullsize//lua/powertrain/CombustionEngine.lua:1495: attempt to perform arithmetic on global 'activeCylsBurnEfficiencyCoef' (a nil value)
    Edit: Here's the file, the custom code is at line 240, can someone take a look?
     

    Attached Files:

    #1 ItsTheLittleAcura!, May 9, 2019
    Last edited: May 9, 2019
  2. Capkirk

    Capkirk
    Expand Collapse

    Joined:
    Nov 19, 2017
    Messages:
    673
    In my experience that means that the variable has not been initialized properly. Are you sure it's spelled right in the Jbeam, and your lua is properly initializing and passing the value to the right place?
     
    • Agree Agree x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice