Solved '=' expected near '=='. What does this mean?

Discussion in 'Mod Support' started by ItsTheLittleAcura!, Nov 1, 2018.

  1. ItsTheLittleAcura!

    ItsTheLittleAcura!
    Expand Collapse

    Joined:
    Feb 9, 2018
    Messages:
    116
    I'm creating a custom shiftLogic controller for the Acura mod I'm making. I tried to replicate Acura's dynamic mode selector by controlling the shift aggression. More info about Acura's dynamic modes can be found https://www.acura.com/tlx/modals/integrated-dynamics-system. I get this error. '=' expected near '=='.
     

    Attached Files:

  2. meywue

    meywue
    Expand Collapse
    Administrator
    BeamNG Team

    Joined:
    Nov 19, 2015
    Messages:
    339
    Your error is in line 173.

    Since you want to assign a value to automaticHandling.mode you are supposed to use just a single equal sign. You only use two equal signs for comparison like in if-statements.

    Wrong:
    Code:
    if automaticHandling.mode == "D" then
      automaticHandling.mode == "S"
    end
    
    Correct:
    Code:
    if automaticHandling.mode == "D" then
      automaticHandling.mode = "S"
    end
    
     
    #2 meywue, Nov 2, 2018
    Last edited: Nov 2, 2018
    • Like Like x 1
  3. ItsTheLittleAcura!

    ItsTheLittleAcura!
    Expand Collapse

    Joined:
    Feb 9, 2018
    Messages:
    116
    Now I've got another error. shiftLogic-tlxautomaticGearbox.lua:646:
    'end' expected (to close 'if' at line 171) near '<eof>'"
     
  4. bidwars

    bidwars
    Expand Collapse

    Joined:
    Sep 23, 2014
    Messages:
    171
    You are missing a number of end's for your if statements.
    --- Post updated ---
    You are missing a number of end's for your if statements.
     
  5. ItsTheLittleAcura!

    ItsTheLittleAcura!
    Expand Collapse

    Joined:
    Feb 9, 2018
    Messages:
    116
    Fixed that issue and the game is fretting about not being able to find the vehicleController lua file. No errors related to my dynamic mode selector. If I use the standard ingame shiftLogic, the vehicle works fine, but the dynamic mode selector has no effect on the transmission.
     
  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