Unsolved AutomaticGearbox.lua current gear indicator error

Discussion in 'Mod Support' started by ItsTheLittleAcura!, Jun 23, 2018.

  1. ItsTheLittleAcura!

    ItsTheLittleAcura!
    Expand Collapse

    Joined:
    Feb 9, 2018
    Messages:
    113
    I am trying to add a current-gear indicator like the one that shows in Sport gear (S1, S2, S3, etc.) to the regular Drive gear (it would look like D1, D2, D3, etc), so I know which gear the transmission is in without using the EngineInfo app or putting the transmission in S. I'm getting an error message (below). Here's the lua file, can someone take a look?
     

    Attached Files:

  2. metalmuncher

    metalmuncher
    Expand Collapse

    Joined:
    Aug 6, 2012
    Messages:
    257
    Problem seems to be in getGearName, line 65 should probably be elseif instead of if. No idea if this will make the rest of your code work, but will probably fix the first error.

    I'd recocomend running an editor with linting like the setup here: https://www.beamng.com/threads/trying-out-a-new-editor.54612/#post-853327 that will tell you about problems like this before you reload in BeamNG.
     
  3. ItsTheLittleAcura!

    ItsTheLittleAcura!
    Expand Collapse

    Joined:
    Feb 9, 2018
    Messages:
    113
    It's working! Thanks!
     
  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