function update(dt) mcontroller.controlModifiers({airJumpModifier = 1.5}); if mcontroller.facingDirection() == 1 then mcontroller.controlParameters(self.movementParameters.standingPoly, {[-5, -2.0], [-4.60, -2.5], [0.35, -2.5], [0.75, -2.0], [0.75, 0.65], [0.35, 1.22], [-4.60, 1.22], [-5, 0.65]} ); mcontroller.controlParameters(self.movementParamaters.crouchingPoly, {[-2, -2.0], [-1.60, -2.5], [0.35, -2.5], [0.75, -2.0], [0.75, -1], [0.35, -0.5], [-1.60, -0.5], [-2, -1]} ); end end I get Error code 3 - ']' expected near ',' Exactly what am I doing wrong?
In lua you don't use [ and ] for objects and arrays (tables), you use { and }. Code: function update(dt) mcontroller.controlModifiers({airJumpModifier = 1.5}) if mcontroller.facingDirection() == 1 then mcontroller.controlParameters(self.movementParameters.standingPoly, {{-5, -2.0}, {-4.60, -2.5}, {0.35, -2.5}, {0.75, -2.0}, {0.75, 0.65}, {0.35, 1.22}, {-4.60, 1.22}, {-5, 0.65}}) mcontroller.controlParameters(self.movementParamaters.crouchingPoly, {{-2, -2.0}, {-1.60, -2.5}, {0.35, -2.5}, {0.75, -2.0}, {0.75, -1}, {0.35, -0.5}, {-1.60, -0.5}, {-2, -1}}) end end Also, you don't need the ; to end a line, but you can use it though...