Biggest Jbeam Error?[stumped]

Discussion in 'Content Creation' started by KennyWah, Mar 28, 2015.

  1. KennyWah

    KennyWah
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    2,629
    Okay.. I am having this issue where I am trying to do my exhaust for my D-15 Derby.. but it just wants to shit all over me..

    for some reason it is giving me an error on a perfect line.. the console log says the error was found on line 148

    Here is the jbeam
    a231a27247.png

    Been trying various things to attempt to fix this issue for hours.


    Thanks for your help in advance.

    BeamNG Log

    Code:
    1370.71508|W|libbeamng.lua.V.Vehicle:loadDirectory|[COLOR=#b22222]unable to decode JSON[/COLOR]: [COLOR=#b22222]vehicles/pickup/pickup_d_engine_v8.jbeam[/COLOR]
    1370.71513|W|libbeamng.lua.V.Vehicle:loadDirectory|JSON decoding error: lua/json.lua:117: [COLOR=#b22222]Invalid input at line: 148[/COLOR]
    1370.71518|W|libbeamng.lua.V.Vehicle:loadDirectory|Last line was:
    1370.71521|W|libbeamng.lua.V.Vehicle:loadDirectory|[COLOR=#ff0000]"beams": [[/COLOR]
    
     
    #1 KennyWah, Mar 28, 2015
    Last edited: Mar 28, 2015
  2. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,685
    You have a malformed json statement. Look at the last node.

    Also you shouldn't quote numbers, quotes define strings of text.

    ["name",number,number,number], is the proper forming of a node.
     
  3. KennyWah

    KennyWah
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    2,629
    Tried that.. didn't work.
     
  4. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,685
    Could you post the JBeam again, now with your changes?
     
  5. KennyWah

    KennyWah
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    2,629
    Same error line 35

    Invalid input at line: 35
    31.41754|W|libbeamng.lua.V.Vehicle:loadDirectory|Last line was:
    31.41759|W|libbeamng.lua.V.Vehicle:loadDirectory|"beams": [


    New Jbeam
    d4f172ee93.png
     
  6. Diamondback

    Diamondback
    Expand Collapse
    Vehicle Systems Lead
    BeamNG Team

    Joined:
    Apr 8, 2014
    Messages:
    1,957
    Line 145 is missing a " :cool:
     
  7. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,685
    Line 33 is malformed, again you have missed a quote (which still shouldn't be there :p)
     
  8. KennyWah

    KennyWah
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    2,629
    See it now..
    Thank you.

    Edit:

    Now the problem is something I have just not seen before.... wtf...

    Code:
    {
    "pickup_header_v8d": {
        "information":{
            "authors":"gabester",
    
    
            "name":"Gavril D-Series Derby Exhaust",
        }
        "slotType" : "pickup_dex",
        "scalebeamSpring":0.84,
        "scalebeamDamp":1.3,
        "scalebeamDeform":1.5,
        "scalebeamStrength":1.78,
        "flexbodies": [
             ["mesh", "[group]:", "nonFlexMaterials"],
             ["pickup_header_v8dl", ["dexl"]],
             ["pickup_header_v8dr_NA", ["dexr"]],
        ],
        "nodes": [
             ["id", "posX", "posY", "posZ"],
             {"collision":true}
             {"selfCollision":true}
             {"frictionCoef":0.9},
             {"nodeMaterial":"|NM_METAL"},
             {"nodeWeight":0.60},
             {"selfCollision":true},
             //Header_Left         
             {"group":"dexl"},         
             ["ex1l", "0.11", "-1.69", "0.8415"],
             ["ex1ll", "0.313", "-1.723", "0.7234"],    
             ["ex2l", "0.094", "-1.69", "0.79"],
             ["ex2ll", "0.31", "-1.723", "0.678"],
             ["ex3l", "0.094", "-1.41", "0.79"],
             ["ex4l", "0.11", "-1.41", "0.841"],
             ["ex4ll", "0.70", "-1.426", "0.702"],
        ],
        "beams": [
              ["id1:", "id2:"],{"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
              {"beamSpring":1501000,"beamDamp":80},
              {"beamDeform":86500,"beamStrength":"FLT_MAX"},
              //HeaderL    
             {"group":"dexl"},          
             ["ex1l", "ex1ll"], 
             ["ex1ll", "ex2ll"],  
             ["ex2ll", "ex2l"], 
             ["ex2l", "ex1l"],    
              //HeaderL_Crosses
             ["ex2l", "ex2ll"],    
             ["ex1ll", "ex2ll"],
             
              
          
              
        ],
        "triangles": [
                ["id1:","id2:","id3:"],
                
                
        ],
    
    Log:

    Code:
    219.00368|W|libbeamng.lua.V.Vehicle:loadDirectory|unable to decode JSON: vehicles/pickup/pickup_d_headerv8.jbeam
    219.00372|W|libbeamng.lua.V.Vehicle:loadDirectory|JSON decoding error: lua/json.lua:135: bad argument #1 to 'find' (string expected, got nil)
    219.01228|E|libbeamng.object|lua/vehicle/beamng.lua:2674: attempt to index local 'part' (a nil value)
    219.01235|E|libbeamng.object|lua/vehicle/props.lua:51: attempt to index field 'data' (a nil value)
    219.78048|E|libbeamng.object|lua/vehicle/sounds.lua:38: attempt to index field 'data' (a nil value)
    219.78059|E|libbeamng.object|lua/vehicle/sensors.lua:68: attempt to index field 'data' (a nil value)
    

    The issue still makes the vehicle unable to spawn.
     
    #8 KennyWah, Mar 29, 2015
    Last edited: Mar 29, 2015
  9. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,685
    In that code snippet you're missing closing brackets

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