Garry's Mod

Garry's Mod

SWEP Construction Kit
SlavaZomba 4 Sep, 2018 @ 3:38pm
Error With Custom Model
I added props to an AR2 model for my custom weapon made with buu342's Swep Creator, but when I paste this :

SWEP.VElements = {
[part2] = { type = "Model", model = "models/props_lab/binderredlabel.mdl", bone = "Base", rel = "", pos = Vector(0, 0, 0), angle = Angle(1.169, -90, -5.844), size = Vector(0.301, 0.301, 0.301), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} },
[part1] = { type = "Model", model = "models/combine_turrets/combine_cannon_gun.mdl", bone = "Base", rel = "", pos = Vector(-0.519, 6.752, 17.142), angle = Angle(87.662, 1, -92.338), size = Vector(0.5, 0.5, 0.5), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} }
end

into the .lua file, save, and then go back into the game, I get a lua error saying :


[ERROR] lua/weapons/weapon_rsd1/shared.lua:103: '}' expected (to close '{' at line 100) near 'end'
1. unknown - lua/weapons/weapon_rsd1/shared.lua:0

Please help. I can't find a way to fix this problem. If anyone knows how, please tell me.
< >
Showing 1-2 of 2 comments
uncle ruckus 24 Dec, 2018 @ 7:11am 
Theres no need for the end there unless you put the tables in a funcition.Try removing the end.
SlavaZomba 24 Dec, 2018 @ 9:01am 
Originally posted by mjolnir:
Theres no need for the end there unless you put the tables in a funcition.Try removing the end.
Thanks. It works now.
< >
Showing 1-2 of 2 comments
Per page: 1530 50