1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.32 Bug Reporting thread
    Solutions and more information may already be available.

followed nadeox's tutorial but i get an error and the game freezes.

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by Rokzy rules, Jul 3, 2014.

  1. Rokzy rules

    Rokzy rules
    Expand Collapse

    Joined:
    Dec 31, 2013
    Messages:
    379
    Pretty much what the title says but I was trying to make a crate using nadeox's tutorial but I get this error

    Code:
    91.999742|BEAMNG| ERR | unable to decode JSON: vehicles/crate//crate.jbeam
    91.999875|BEAMNG| ERR | JSON decoding error: lua/json.lua:117: Invalid input at line: 11
    91.999935|BEAMNG| ERR | Last line was:
    91.999994|BEAMNG| ERR | [cube", "[crate]:"],
    92.001054|BEAMNG| ERR | lua/vehicle/drivetrain.lua:282: attempt to index field 'data' (a nil value)
    I followed his tutorial tweaking some things but keeping the formatting the same. I'm using notepad ++ this is the Jbeam file

    Code:
    {"crate": {
        "information":{
            "authors":"rokzy",
            "name":"crate",
        }
        "refNodes":[        ["ref:", "back:", "left:", "up:"]
            ["tfl", "tfr", "tbl", "tbr"]
            ],
        
        "flexbodies": [,
             [cube", "[crate]:"],
         ],
      
     "nodes": [         ["id", "posX", "posY", "posZ"],
             {"nodeWeight":70},
             {"group":"crate"},
             {"frictionCoef":0.7},
             {"nodeMaterial":"|NM_METAL"},
             {"collision":true}
             {"selfCollision":false}
       ],
    "nodes": [         ["id", "posX", "posY", "posZ"],
             {"nodeWeight":70},
             {"group":"MyCar"},
             {"frictionCoef":0.7},
             {"nodeMaterial":"|NM_METAL"},
             {"collision":true}
             {"selfCollision":false}
             ["tfl", 1, 1, 2],
             ["tfr", 1, 1, 2],
             ["tbl", 1, -1, 2],
             ["tbr", -1, -1, 2],
             ["bfl", 1, 1, 0],
             ["bfr", -1, 1, 0],
             ["bbl", 1, -1, 0],
             ["bbr", 1, -1, 0],
        ],
     "beams": [     ["id1:", "id2:"], 
         {"beamSpring":3001000,"beamDamp":400},
         {"beamDeform":5000,"beamStrength":"50000"},
      // top
         ["tfl","tfr"],
         ["tbl","tbr"],
         ["tfl","tbl"],
         ["tfr","tbr"],
      // bottom
      ["bfl","bfr"],
         ["bbl","bbr"],
         ["bfl","bbl"],
         ["bfr","bbr"],
       // support
         ["tfl","bfl"],
         ["tfr","bfr"],
         ["tbl","bbl"],
         ["tbr","bbr"],
         // diagonals
         ["tfl","tbr"],
         ["tfr","tbr"],
         ["bfl","bbr"],
         ["bfr","bbr"],
         
         ["bfr","tfl"],
         ["bfl","tbr"],
         ["bbr","tbl"],
         ["bbl","tbr"],
         
         ["bbr","tfr"],
         ["bfr","tbr"],
         ["tbr","bbl"],
         ["tbl","bbr"],
        
        ],
     
     
    }
    }
    
    The DAE file in blender blender file.png
     
  2. randomshortguy

    randomshortguy
    Expand Collapse

    Joined:
    Aug 9, 2013
    Messages:
    1,562

    Something is wrong here, like a space or bracket, or maybe it can't find your object. In you DAE, try renaming your object to crate, and including the subset object, and set your flexbodies to crate and crate. Tinker with what I said;)
     
  3. Narwhal

    Narwhal
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,698
     
  4. Rokzy rules

    Rokzy rules
    Expand Collapse

    Joined:
    Dec 31, 2013
    Messages:
    379
    The My car bit wouldn't work because I called it 'crate'. edit: looked back at it I see my mistake the node group needs to be 'crate I think. I'll try it, but I don't really feel motivated right now.
     
  5. Narwhal

    Narwhal
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,698
    k. I put the MyCar there because that is the name of the node group you created
     
  6. Rokzy rules

    Rokzy rules
    Expand Collapse

    Joined:
    Dec 31, 2013
    Messages:
    379
    I know I had 2 different node groups when I only wanted 1 so that probably messed everything up. 40 Posts and this is the first few days of my summer holiday's *grimaces*

    - - - Updated - - -

    It still crashes with the same error message:mad:.
     
  7. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,686
    Bad formatting can lead to crashes too.

    Code:
    
        "flexbodies": [,
             ["cube", ["MyCar"]],
         ],
    	"nodes": [         ["id", "posX", "posY", "posZ"],
             {"nodeWeight":70},
             {"group":"MyCar"},
             {"frictionCoef":0.7},
             {"nodeMaterial":"|NM_METAL"},
             {"collision":true}
             {"selfCollision":false}
             ["tfl", 1, 1, 2],
             ["tfr", 1, 1, 2],
             ["tbl", 1, -1, 2],
             ["tbr", -1, -1, 2],
             ["bfl", 1, 1, 0],
             ["bfr", -1, 1, 0],
             ["bbl", 1, -1, 0],
             ["bbr", 1, -1, 0],
    
    
    etc..
    
    Try keeping all the section line with a "Tab Space" infront of them (just press tab while in text editor to add a Tab Space), or copy paste from here above.
    Make sure also the commented parts like //Top has the same amount of space infront. I got my game crashing when loading a car I made because of that :\
     
  8. Rokzy rules

    Rokzy rules
    Expand Collapse

    Joined:
    Dec 31, 2013
    Messages:
    379
    Trying

    - - - Updated - - -

    Doesn't work now I got this error :

    Code:
    95.878392|BEAMNG| ERR | *** Error: table too deep, max depth allowed: 3
    95.878448|BEAMNG| ERR | *** preparation error
    95.878571|BEAMNG| ERR | spawnVehicle: got exception: lua/vehicle/beamstate.lua:161: bad argument #1 to 'pairs' (table expected, got nil)

    With this Jbeam :

    Code:
    {"crate": {
        "information":{
            "authors":"rokzy",
            "name":"crate",
        }
        "refNodes":[        ["ref:", "back:", "left:", "up:"]
     ["tfl", "tfr", "tbl", "tbr"]
     ],
        
     "flexbodies": [,
     ["crate", ["crate"]],
         ],
     "nodes": [         ["id", "posX", "posY", "posZ"],
     {"nodeWeight":70},
     {"group":"crate"},
     {"frictionCoef":0.7},
     {"nodeMaterial":"|NM_METAL"},
     {"collision":true}
     {"selfCollision":false}
     ["tfl", 1, 1, 2],
     ["tfr", 1, 1, 2],
     ["tbl", 1, -1, 2],
     ["tbr", -1, -1, 2],
     ["bfl", 1, 1, 0],
     ["bfr", -1, 1, 0],
     ["bbl", 1, -1, 0],
     ["bbr", 1, -1, 0],
    
        ],
     "beams": [     ["id1:", "id2:"], 
         {"beamSpring":3001000,"beamDamp":400},
         {"beamDeform":5000,"beamStrength":"50000"},
      // top
         ["tfl","tfr"],
         ["tbl","tbr"],
         ["tfl","tbl"],
         ["tfr","tbr"],
      // bottom
      ["bfl","bfr"],
         ["bbl","bbr"],
         ["bfl","bbl"],
         ["bfr","bbr"],
      // support
         ["tfl","bfl"],
         ["tfr","bfr"],
         ["tbl","bbl"],
         ["tbr","bbr"],
         // diagonals
         ["tfl","tbr"],
         ["tfr","tbr"],
         ["bfl","bbr"],
         ["bfr","bbr"],
         
         ["bfr","tfl"],
         ["bfl","tbr"],
         ["bbr","tbl"],
         ["bbl","tbr"],
         
         ["bbr","tfr"],
         ["bfr","tbr"],
         ["tbr","bbl"],
         ["tbl","bbr"],
        
        ],
     
     
    }
    }
    
    I'm embarrassed JAM3SwithGAM3S is reading this.

    - - - Updated - - -

    Still getting the error above and there is nothing over 3 spaces:mad: (I think)


    Code:
    {"crate": {
       "information":{
       "authors":"rokzy",
       "name":"crate",
       }
       "refNodes":[        ["ref:", "back:", "left:", "up:"]
       ["tfl", "tfr", "tbl", "tbr"]
       ],
       "flexbodies": [,
       ["crate", ["crate"]],
       ],
       "nodes": [         ["id", "posX", "posY", "posZ"],
       {"nodeWeight":70},
       {"group":"crate"},
       {"frictionCoef":0.7},
       {"nodeMaterial":"|NM_METAL"},
       {"collision":true}
       {"selfCollision":false}
       ["tfl", 1, 1, 2],
       ["tfr", 1, 1, 2],
       ["tbl", 1, -1, 2],
       ["tbr", -1, -1, 2],
       ["bfl", 1, 1, 0],
       ["bfr", -1, 1, 0],
       ["bbl", 1, -1, 0],
       ["bbr", 1, -1, 0],
       ],
       "beams": [     ["id1:", "id2:"], 
       {"beamSpring":3001000,"beamDamp":400},
       {"beamDeform":5000,"beamStrength":"50000"},
       // top
       ["tfl","tfr"],
       ["tbl","tbr"],
       ["tfl","tbl"],
       ["tfr","tbr"],
       // bottom
       ["bfl","bfr"],
       ["bbl","bbr"],
       ["bfl","bbl"],
       ["bfr","bbr"],
       // support
       ["tfl","bfl"],
       ["tfr","bfr"],
       ["tbl","bbl"],
       ["tbr","bbr"],
       // diagonals
       ["tfl","tbr"],
       ["tfr","tbr"],
       ["bfl","bbr"],
       ["bfr","bbr"],
       ["bfr","tfl"],
       ["bfl","tbr"],
       ["bbr","tbl"],
       ["bbl","tbr"],
       ["bbr","tfr"],
       ["bfr","tbr"],
       ["tbr","bbl"],
       ["tbl","bbr"],
       ],
    }
    }
     
  9. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,686
    Code:
    {"crate": {
    
    
    To
    Code:
    {
    "crate": {
    
    
    Try that.
     
  10. Rokzy rules

    Rokzy rules
    Expand Collapse

    Joined:
    Dec 31, 2013
    Messages:
    379
    What ? mines was like this
    Code:
    ["flexbodies": [,
     ["crate": {, ["crate"]],
     ],
    Have I messed that bit up ?
     
  11. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,686
    I'm saying the first line. I will see if tomorrow I can post a empty file people can use a start template, so you don't have to mess with all that thing and get into some syntax errors.
     
  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