LUA Problem With Simple Chassis

Discussion in 'Content Creation' started by Tango91, Nov 17, 2013.

  1. Tango91

    Tango91
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    68
    Hey all, having a baffling problem while trying to put together a golf cart. (taster chassis image below)

    I have my basic chassis ingame, and I'm trying to add the rear axle.

    I have 2 .jbeam files, caddy.jbeam (the main one) and caddy_rear_axle.jbeam.

    The main .jbeam file contains basic stuff, nodes, beams and a chassis flexbody, and it works just fine and I can bat it around ingame to see it bounce and deform and all that good stuff.

    The other .jbeam file, for the moment, only contains a few nodes and beams, and the necessary file and slot information to stop the game complaining, but when the game tries to load both it throws a wobbly, stops the simulation and renders all parts of my .DAE file, including ones that haven't been written into the .jbeam files yet.

    I can't help notice the second error references the drivetrain; so far this thing doesn't have wheels or an engine, and there is no code relating to either.

    If anyone has any thoughts about what's up I'd be glad to hear them.

    Thanks,
    Tango

    The errors shown in the console:
    Code:
    4251.419590|BEAMNG| INFO| loading vehicle directory:vehicles/caddy/4251.419746|BEAMNG| INFO| * loading jbeam files:
    4251.422531|BEAMNG| INFO|   * vehicles/caddy//caddy.jbeam with 1 parts
    4251.422917|BEAMNG| INFO|   * vehicles/caddy//caddy_rear_axle.jbeam with 1 parts
    4251.422981|BEAMNG| ERR | got exception: lua/vehicle/beamng.lua:2147: attempt to index a nil value
    4251.423498|BEAMNG| ERR | lua/vehicle/drivetrain.lua:245: attempt to index field 'data' (a nil value)
     

    Attached Files:

    • chassis.png
  2. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,960
    Can you share the actual JBeams with anyone?

    I did actually come across this issue when altering the pickup, although for the life of me I cannot remember what caused it.
     
  3. Tango91

    Tango91
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    68
    Jbeam files should be attached, thanks for the reply :)
     

    Attached Files:

  4. metalmuncher

    metalmuncher
    Expand Collapse

    Joined:
    Aug 6, 2012
    Messages:
    257
    On line 245 the game tries to load engine data IIRC. I would try adding a basic engine to the truck, just copy one of the default ones for now.
     
  5. gabester

    gabester
    Expand Collapse
    Vehicle Director
    BeamNG Team

    Joined:
    Jun 6, 2012
    Messages:
    2,653
    Everything in the .jbeam looks right, I think. The only thing is that the main vehicle's slot type should be "main", not "caddy". I don't believe you need an engine section as all the inanimate objects (road signs, etc.) load fine without it. Also make sure your .DAE's filename matches the name of the folder.
     
  6. Tango91

    Tango91
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    68
    Thanks for the replies guys. Turns out Gabe was right about the SlotType thing. Working on wheels now :)

    - - - Updated - - -

    Mmm, progress :)
     

    Attached Files:

    • caddy.png
    #6 Tango91, Nov 19, 2013
    Last edited: Nov 19, 2013
  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