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