Help with jbeam error

Discussion in 'Content Creation' started by ryakra, Jul 18, 2014.

  1. ryakra

    ryakra
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    213
    Im trying my first jbeam and everything was going well, then suddenly I kept getting this error:

    I checked the line and this is what is there:
    Code:
    Code:
    "beams": [
              ["id1:", "id2:"],
              {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
              //--trunk--
              {"beamSpring":1201000,"beamDamp":1700},
              {"beamDeform":101500,"beamStrength":"FLT_MAX"},
              //trunk main shape
    ["nl76","nl78"],
    ["nl3","nl6"],
    ["nl78","nl6"],
    ["nl44","nl6"],

    All the nodes mentioned are there:
    Code:
    Code:
    ["nl76",1.169,2.333,1.044],
    ["nl78",0.869,2.333,1.281],
    ["nl3",1.169,2.029,1.044],
    ["nl6",0.869,2.029,1.281],
    ["nl44",0.845,2.181,1.334],

    so I cant find out what the problem is. I bet it is a little error. but eh its my first jbeam.
     

    Attached Files:

    • hNlhQtl.png
  2. Sushi2

    Sushi2
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    60
    I notice that your json directory has two \\ in it. Maybe that helps?
     
  3. Zappymouse

    Zappymouse
    Expand Collapse

    Joined:
    Jun 18, 2013
    Messages:
    1,065
    You didn't close the beams section with a ], so the parser panicked and broke the world in half.

    Just add ], to a new line and problem solved!
     
  4. ryakra

    ryakra
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    213
    sorry for not replying, I was on vacation.
    Im new to jbeam so im confused on what you mean, you mean this?:

    Code:
    		 {"selfCollision":true}
    		 
    	], <------
    
    Mind giving a example, like I said, this is my first jbeam XD
     
  5. Zappymouse

    Zappymouse
    Expand Collapse

    Joined:
    Jun 18, 2013
    Messages:
    1,065
    Sure. The structure of jbeam (or any other language, really) is quite simple in that if you open a bracket "[", curly brace "{" or quotation mark """, you have to close it. Take your beams section for example:
    Code:
    "beams": [B][COLOR=red][[/COLOR][/B]
              ["id1:", "id2:"],
              {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
              //--trunk--
              {"beamSpring":1201000,"beamDamp":1700},
              {"beamDeform":101500,"beamStrength":"FLT_MAX"},
              //trunk main shape
    [COLOR=green][B][[/B][/COLOR]"nl76","nl78"[B][COLOR=green]][/COLOR][/B],
    [COLOR=green][B][[/B][/COLOR]"nl3","nl6"[B][COLOR=green]][/COLOR][/B][COLOR=#777777],[/COLOR][COLOR=#777777]
    [/COLOR][COLOR=#777777][COLOR=green][B][[/B][/COLOR][/COLOR][COLOR=#777777]"nl78","nl6"[/COLOR][B][COLOR=green]][/COLOR][/B][COLOR=#777777],[/COLOR][COLOR=#777777]
    [/COLOR][COLOR=#777777][COLOR=green][B][[/B][/COLOR][/COLOR][COLOR=#777777]"nl44","nl6"[/COLOR][B][COLOR=green]][/COLOR][/B][COLOR=#777777],[/COLOR]
    See how you've left the bracket in line 1 open? You need to close it at the end of the beams section so it makes sense to the parser, like so:

    Code:
    "beams": [COLOR=red][[/COLOR]
              ["id1:", "id2:"],
              {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
              //--trunk--
              {"beamSpring":1201000,"beamDamp":1700},
              {"beamDeform":101500,"beamStrength":"FLT_MAX"},
              //trunk main shape
    [COLOR=green][B][[/B][/COLOR]"nl76","nl78"[B][COLOR=green]][/COLOR][/B],
    [COLOR=green][B][[/B][/COLOR]"nl3","nl6"[B][COLOR=green]][/COLOR][/B][COLOR=#777777],[/COLOR][COLOR=#777777]
    [/COLOR][COLOR=#777777][COLOR=green][B][[/B][/COLOR][/COLOR][COLOR=#777777]"nl78","nl6"[/COLOR][B][COLOR=green]][/COLOR][/B][COLOR=#777777],[/COLOR][COLOR=#777777]
    [/COLOR][COLOR=#777777][COLOR=green][B][[/B][/COLOR][/COLOR][COLOR=#777777]"nl44","nl6"[/COLOR][B][COLOR=green]][/COLOR][/B][COLOR=#777777],
    [/COLOR][COLOR=red][B]],[/B][/COLOR]
    Hope this helps to solve your problem!
     
  6. ryakra

    ryakra
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    213
    I do have those, here is my entire jbeam, (I dont know how to do the spoiler sorry)
    Code:
    {
    "bruckwell_wing": {
    	"information":{
    		"authors":"gabester",
    		"name":"Bruckell Moonhawk Spoiler",
    	}
        "slotType" : "bruckwell_wing",
    	"selfCollisionThickness":0.02,
    	"remoteCollisionThickness":0.05,
    	"scalenodeWeight":0.89,
    	"scalebeamSpring":0.83,
    	"scalebeamDamp":0.84,
    	"scalebeamDeform":0.6,
    	"scalebeamStrength":0.84,
    	"flexbodies": [
    		 ["mesh", "[group]:", "nonFlexMaterials"],
    		 ["bruckwell_wing", ["bruckwell_wing"]],
    	],
    	"nodes": [
    		 ["id", "posX", "posY", "posZ"],
    		 //--wing--
    		 {"nodeMaterial":"|NM_METAL"},
    		 {"frictionCoef":0.7},
    		 {"collision":true}
    		 {"selfCollision":true},
    		 {"group":"bruckwell_wing"},
    		 {"nodeWeight":1.4},
    ["nl0",1.257,2.029,0.598],
    ["nl1",1.237,2.029,0.88],
    ["nl2",1.221,2.029,0.599],
    ["nl3",1.169,2.029,1.044],
    ["nl4",0.926,2.029,1.108],
    ["nl5",0.883,2.029,1.064],
    ["nl6",0.869,2.029,1.281],
    ["nl7",0.565,2.029,1.343],
    ["nl8",0.438,2.029,1.442],
    ["n9",0.0,2.029,1.343],
    ["n10",0.0,2.029,1.442],
    ["nr11",-0.438,2.029,1.442],
    ["nr12",-0.438,2.029,1.442],
    ["nr13",-0.565,2.029,1.343],
    ["nr14",-0.822,2.029,1.27],
    ["nr15",-0.883,2.029,1.094],
    ["nr16",-1.033,2.029,0.846],
    ["nr17",-1.169,2.029,1.044],
    ["nr18",-1.183,2.029,0.599],
    ["nr19",-1.219,2.029,0.597],
    ["nr20",-1.227,2.029,0.881],
    ["nl21",0.282,2.168,0.93],
    ["nl22",0.282,2.168,1.141],
    ["nl23",0.282,2.168,1.166],
    ["nl24",0.282,2.168,1.341],
    ["nl25",0.233,2.168,1.035],
    ["nl26",0.183,2.168,0.93],
    ["nl27",0.183,2.168,1.141],
    ["nl28",0.183,2.168,1.166],
    ["nl29",0.183,2.168,1.349],
    ["nr30",-0.183,2.168,0.93],
    ["nr31",-0.183,2.168,1.141],
    ["nr32",-0.183,2.168,1.166],
    ["nr33",-0.183,2.168,1.166],
    ["nr34",-0.183,2.168,1.351],
    ["nr35",-0.233,2.168,1.035],
    ["nr36",-0.233,2.168,1.259],
    ["nr37",-0.282,2.168,0.93],
    ["nr38",-0.282,2.168,1.141],
    ["nr39",-0.282,2.168,1.166],
    ["nr40",-0.282,2.168,1.343],
    ["nl41",1.247,2.181,0.739],
    ["nl42",1.203,2.181,0.962],
    ["nl43",1.052,2.181,0.831],
    ["nl44",0.845,2.181,1.334],
    ["nl45",0.724,2.181,1.203],
    ["nl46",0.63,2.181,1.415],
    ["n47",0.0,2.181,1.035],
    ["n48",0.0,2.181,1.343],
    ["n49",0.0,2.181,1.442],
    ["nr50",-0.63,2.181,1.415],
    ["nr51",-0.883,2.181,1.094],
    ["nr52",-0.995,2.181,1.216],
    ["nr53",-1.033,2.181,0.846],
    ["nr54",-1.169,2.181,1.044],
    ["nr55",-1.183,2.181,0.599],
    ["nr56",-1.198,2.181,0.963],
    ["nr57",-1.223,2.181,0.739],
    ["nl58",0.282,2.194,0.93],
    ["nl59",0.282,2.194,1.341],
    ["nl60",0.183,2.194,0.93],
    ["nl61",0.183,2.194,1.141],
    ["nr62",-0.183,2.194,0.93],
    ["nr63",-0.183,2.194,1.141],
    ["nr64",-0.183,2.194,1.141],
    ["nr65",-0.183,2.194,1.166],
    ["nr66",-0.183,2.194,1.35],
    ["nr67",-0.233,2.194,1.035],
    ["nr68",-0.233,2.194,1.254],
    ["nr69",-0.282,2.194,0.93],
    ["nr70",-0.282,2.194,1.141],
    ["nr71",-0.282,2.194,1.166],
    ["nr72",-0.282,2.194,1.342],
    ["nl73",1.257,2.333,0.598],
    ["nl74",1.237,2.333,0.88],
    ["nl75",1.221,2.333,0.599],
    ["nl76",1.169,2.333,1.044],
    ["nl77",0.883,2.333,1.064],
    ["nl78",0.869,2.333,1.281],
    ["nl79",0.565,2.333,1.343],
    ["nl80",0.438,2.333,1.442],
    ["n81",0.0,2.333,1.343],
    ["n82",0.0,2.333,1.442],
    ["nr83",-0.438,2.333,1.442],
    ["nr84",-0.565,2.333,1.343],
    ["nr85",-0.822,2.333,1.27],
    ["nr86",-0.883,2.333,1.094],
    ["nr87",-1.033,2.333,0.846],
    ["nr88",-1.169,2.333,1.044],
    ["nr89",-1.183,2.333,0.599],
    ["nr90",-1.219,2.333,0.597],
    ["nr91",-1.227,2.333,0.881],
    		 {"selfCollision":true}
    		 
    	],
    	
    	"beams": [
    		  ["id1:", "id2:"],
    		  {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    		  //--trunk--
    		  {"beamSpring":1201000,"beamDamp":1700},
    		  {"beamDeform":101500,"beamStrength":"FLT_MAX"},
    		  //trunk main shape
    ["nl76","nl78"],
    ["nl3","nl6"],
    ["nl78","nl6"],
    ["nl44","nl6"],
    ["nl78","nl44"],
    ["nl8","nl80"],
    ["nl46","nl80"],
    ["nl8","nl46"],
    ["nl8","n49"],
    ["n49","nl80"],
    ["n49","nr12"],
    ["n10","nr11"],
    ["n82","nr83"],
    ["nl3","nl1"],
    ["nl1","nl0"],
    ["nl2","nl5"],
    ["nl0","nl2"],
    ["nl1","nl74"],
    ["nl0","nl73"],
    ["nl74","nl73"],
    ["nl41","nl74"],
    ["nl41","nl0"],
    ["nl1","nl41"],
    ["nl73","nl41"],
    ["nl76","nl74"],
    ["nl42","nl1"],
    ["nl42","nl76"],
    ["nl3","nl42"],
    ["nl74","nl42"],
    ["nl6","nl4"],
    ["nl5","nl77"],
    ["n81","nr84"],
    ["nr84","nr85"],
    ["nr85","nr86"],
    ["nr83","n49"],
    ["nr83","nr12"],
    ["nr51","nr15"],
    ["nr53","nr86"],
    ["nr15","nr53"],
    ["nr54","nr17"],
    ["nr52","nr17"],
    ["nr51","nr86"],
    ["nr88","nr52"],
    ["nr15","nr13"],
    ["nr84","nr13"],
    ["nr84","nr86"],
    ["nr12","nr50"],
    ["nr13","nr14"],
    ["nr15","nr14"],
    ["n9","nl7"],
    ["nl79","nl7"],
    ["n48","nl7"],
    ["n48","nr84"],
    ["nl79","n48"],
    ["nr13","n48"],
    ["nl80","nl79"],
    ["nr83","nr84"],
    ["n82","nl80"],
    ["n81","nl79"],
    ["n82","n81"],
    ["n10","nl8"],
    ["n9","nr13"],
    ["n10","n9"],
    ["n49","n10"],
    ["n49","n82"],
    ["n48","n9"],
    ["n48","n81"],
    ["nl5","nl7"],
    ["nl77","nl79"],
    ["nl45","nl79"],
    ["nl45","nl5"],
    ["nl7","nl45"],
    ["nl77","nl45"],
    ["nr20","nr19"],
    ["nr91","nr90"],
    ["nr19","nr90"],
    ["nr20","nr17"],
    ["nr91","nr88"],
    ["nr20","nr91"],
    ["nr57","nr91"],
    ["nr57","nr19"],
    ["nr20","nr57"],
    ["nr90","nr57"],
    ["nr87","nr86"],
    ["nr16","nr15"],
    ["nr91","nr87"],
    ["nr20","nr16"],
    ["nr56","nr20"],
    ["nr56","nr88"],
    ["nr17","nr56"],
    ["nr91","nr56"],
    ["nl3","nl4"],
    ["nr12","nr13"],
    ["nl8","nl7"],
    ["n9","nr30"],
    ["n9","nl26"],
    ["n81","nr62"],
    ["n81","nl60"],
    ["nr30","nr62"],
    ["nl26","nl60"],
    ["nr30","nr31"],
    ["nr31","nl27"],
    ["nl26","nl27"],
    ["nl60","nl61"],
    ["nl61","nr63"],
    ["nr62","nr63"],
    ["n47","nr63"],
    ["n47","nl26"],
    ["nr31","n47"],
    ["nl60","n47"],
    ["nr30","n47"],
    ["nl61","n47"],
    ["nr62","n47"],
    ["nl27","n47"],
    ["nr30","nr37"],
    ["nr38","nr40"],
    ["nr40","nr34"],
    ["nr34","nr32"],
    ["nr32","nl28"],
    ["nl28","nl29"],
    ["nl29","nl24"],
    ["nl22","nl21"],
    ["nl26","nl21"],
    ["nl22","nl24"],
    ["nl27","nl22"],
    ["nl25","nl21"],
    ["nl25","nl27"],
    ["nl22","nl25"],
    ["nl26","nl25"],
    ["nl21","nl58"],
    ["nl60","nl58"],
    ["nl24","nl59"],
    ["nl58","nl59"],
    ["nl28","nl23"],
    ["nl24","nl23"],
    ["nl22","nl23"],
    ["nl27","nl28"],
    ["nl29","nl23"],
    ["nl28","nl24"],
    ["nr38","nr37"],
    ["nr31","nr38"],
    ["nr35","nr38"],
    ["nr35","nr30"],
    ["nr31","nr35"],
    ["nr37","nr35"],
    ["nr31","nr33"],
    ["nr38","nr39"],
    ["nr33","nr39"],
    ["nr36","nr39"],
    ["nr36","nr34"],
    ["nr40","nr36"],
    ["nr33","nr36"],
    ["nr38","nr70"],
    ["nr70","nr64"],
    ["nr37","nr69"],
    ["nr70","nr69"],
    ["nr62","nr69"],
    ["nr67","nr69"],
    ["nr67","nr64"],
    ["nr70","nr67"],
    ["nr62","nr67"],
    ["nr64","nr65"],
    ["nr70","nr71"],
    ["nr65","nr71"],
    ["nr39","nr71"],
    ["nr40","nr72"],
    ["nr71","nr72"],
    ["nr72","nr66"],
    ["nr65","nr66"],
    ["nr68","nr72"],
    ["nr68","nr65"],
    ["nr66","nr68"],
    ["nr71","nr68"],
    ["nl4","nl5"],
    ["nr51","nr52"],
    ["nr53","nr56"],
    ["nr17","nr15"],
    ["nr86","nr88"],
    ["nr54","nr88"],
    ["nr51","nr54"],
    ["nr52","nr54"],
    ["nr85","nr14"],
    ["nr17","nr14"],
    ["nr85","nr88"],
    ["nl3","nl76"],
    ["nr19","nr18"],
    ["nr16","nr18"],
    ["nr90","nr89"],
    ["nr87","nr89"],
    ["nr55","nr89"],
    ["nr53","nr87"],
    ["nr53","nr16"],
    ["nr55","nr18"],
    ["nr53","nr55"],
    ["nr85","nr69"],
    ["nr14","nr37"],
    ["nl73","nl75"],
    ["nl77","nl75"],
    ["nl43","nl75"],
    ["nl43","nl5"],
    ["nl2","nl43"],
    ["nl77","nl43"],
    
    
    		  {"optional":false},
    		  {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
    		  
    	],
    	"triangles": [
    			["id1:","id2:","id3:"],
    			//trunk
    			{"group":"moonhawk_trunk"},
    						
    			{"group":""},
    			
    			
    	],
    }
    }
    
     
  7. Fireboyd78

    Fireboyd78
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    85
    I think you may have an encoding problem. My (unfinished) JBeam tool loaded it just fine:

    (imported from here)
     
  8. ryakra

    ryakra
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    213
    Tried recreating a .jbeam, same error but different table: ######## thing every time and beamng closes after 3 minuets of loading the moonhawk (the car im doing this on) Not sure what to do :(
     
  9. Fireboyd78

    Fireboyd78
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    85
    What are you using to edit the file? As I said, it sounds like an encoding issue. Try using Notepad++ and make sure the encoding is set to "UTF-8 Without BOM".
     
  10. ryakra

    ryakra
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    213
    I use notepad++ for everything. I will check the encoding when I wake up, it's 11pm currently :p

    - - - Updated - - -

    It is :(
     
  11. Fireboyd78

    Fireboyd78
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    85
    Can you upload the .jbeam file? Instead of pasting it into a code block.
     
  12. ryakra

    ryakra
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    213
    sure
    Here it is.
     

    Attached Files:

  13. Fireboyd78

    Fireboyd78
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    85
    You have a very bizarre problem, my friend. It worked for me:


    (imported from here)

    By the way, you did add it to the slots in 'moonhawk.jbeam', correct? Like this:

    Code:
    {
    "moonhawk": {    
        "information":{
            "authors":"gabester",
            "name":"Bruckell Moonhawk",
        }
        "slotType" : "main",
        "slots": [
            ["type", "default", "description"]
            ["moonhawk_body","moonhawk_body", "Bruckell Moonhawk Body"],
            ["moonhawk_bumper_F","moonhawk_bumper_F", "Bruckell Moonhawk Front Bumper"],
            ["moonhawk_bumper_R","moonhawk_bumper_R", "Bruckell Moonhawk Rear Bumper"],
            //engine
            ["moonhawk_fueltank","moonhawk_fueltank", "Bruckell Moonhawk Fuel Tank"],
            ["moonhawk_innerfender_FR","moonhawk_innerfender_FR", "Bruckell Moonhawk Right Inner Fender"],
            ["moonhawk_innerfender_FL","moonhawk_innerfender_FL", "Bruckell Moonhawk Left Inner Fender"],
            ["moonhawk_radsupport","moonhawk_radsupport", "Bruckell Moonhawk Radiator Support"],
            ["moonhawk_engine","moonhawk_engine_v8", "Bruckell Moonhawk Engine"],
            //running gear
            ["moonhawk_suspension_R","moonhawk_suspension_R", "Bruckell Moonhawk Rear Suspension"],
            ["moonhawk_suspension_F","moonhawk_suspension_F", "Bruckell Moonhawk Front Suspension"],
            
            // add spoiler here
            ["bruckwell_wing","bruckwell_wing", "Bruckell Moonhawk Spoiler"],
        ],
    // rest of file
    
    You should try to force update your game. I think something's gone haywire with yours!:p
     
  14. ryakra

    ryakra
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    213
    I added the slots in the trunk jbeam, I wil try updating

    - - - Updated - - -

    Tried updating (not sure if forced, I dont know how to force on the new) no change.
     
  15. ryakra

    ryakra
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    213
    any other suggestions?
     
  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