Garry's Mod

Garry's Mod

SWEP Construction Kit
SlavaZomba 2018 年 9 月 4 日 下午 3:38
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.
< >
正在显示第 1 - 2 条,共 2 条留言
uncle ruckus 2018 年 12 月 24 日 上午 7:11 
Theres no need for the end there unless you put the tables in a funcition.Try removing the end.
SlavaZomba 2018 年 12 月 24 日 上午 9:01 
引用自 mjolnir
Theres no need for the end there unless you put the tables in a funcition.Try removing the end.
Thanks. It works now.
< >
正在显示第 1 - 2 条,共 2 条留言
每页显示数: 1530 50