Javascript 未捕获的语法错误:缺少)在参数列表3.js之后

Javascript 未捕获的语法错误:缺少)在参数列表3.js之后,javascript,Javascript,因此,我尝试使用cannon.js和three.js制作第三人称游戏,但我遇到了以下错误: 未捕获的语法错误:参数列表后缺少 它来自以下脚本: //create the model _three.createModel(window.game.models.house, 12, new THREE.MeshLambertMaterial({ color: window.game.static.colors.cyan, shading: THREE.FlatShading }); //loads

因此,我尝试使用cannon.js和three.js制作第三人称游戏,但我遇到了以下错误: 未捕获的语法错误:参数列表后缺少 它来自以下脚本:

//create the model
_three.createModel(window.game.models.house, 12, new THREE.MeshLambertMaterial({ color: window.game.static.colors.cyan, shading: THREE.FlatShading });
//loads the model and calls it whatever
var house = _three.createModel(window.game.models.house, 12, new THREE.MeshLambertMaterial({ color: window.game.static.colors.cyan, shading: THREE.FlatShading });
console.log(house.mesh);
//collects the data from the model
_three.createModel(jsonData, scale, materials, isGeometry);
//loads the model
loader.load("js/game/game.models.js", function(geometry, materials) {
    window.game.models = { house: geometry };

    window.gameInstance = window.game.core();

    window.gameInstance.init({
        domContainer: document.querySelector("#game"),
        rendererClearColor: window.game.static.colors.black
    });
});
这应该做的是获取一个从blender导出的JSON脚本,并将其导入到我的世界中,但它没有加载,但它显示了这个非特定的错误。 给出错误的代码行是three.createModelwindow.game.models.house,12,new three.MeshLambertMaterial{color:window.game.static.colors.cyan,shading:three.FlatShading}; 如果有任何可能的方法来解决这个问题,或者如果我可以回复更有用的支持,请告诉我

问题: 你的陈述中遗漏了什么

解决方案: 始终正确地写出开头和结尾的陈述

替换代码中的以下行:

建议: 用于在堆栈溢出中发布之前修复这些错误。这些是非常基本的错误

如何使用JSLint:
当您打开JsLint并单击下面的JsLint按钮时,复制代码并将其粘贴到文本框中,您将看到代码中存在的所有错误。但是JsLint给您带来的不仅仅是普通语法错误,因此您只能解决基本错误,如果您希望代码更好,您还可以修复其他错误

错误已经告诉您问题是什么:缺少a。请注意,这是一个基本的JS语法错误,与three.JS、cannon.JS或webgl无关。括号需要平衡,即每个开口都需要一个结束符。可能重复:
//create the model
_three.createModel(window.game.models.house, 12, new THREE.MeshLambertMaterial({ color: window.game.static.colors.cyan, shading: THREE.FlatShading }));
//loads the model and calls it whatever
var house = _three.createModel(window.game.models.house, 12, new THREE.MeshLambertMaterial({ color: window.game.static.colors.cyan, shading: THREE.FlatShading }));