• PointShop Trails Help
    2 replies, posted
I am not the best at lua, but I can't seem to figure out what the problem here is. I tried adding new trails to my PointShop. In this case I used "nature/inftreec" for the material for my trail. When I bought it, it crashed my game. No error messages. Nothing, then every time I tried to join back, it would crash my game again as soon as I got on the server. The only sort of error is from the console which says: [IMG]http://i.imgur.com/3asW0G2.png[/IMG] This is my current code for the trail, if it helps. [CODE] ITEM.Name = 'Tree Trail' ITEM.Price = 200 ITEM.Material = 'nature/inftreec' function ITEM:OnEquip(ply, modifications) ply.TreeTrail = util.SpriteTrail(ply, 0, modifications.color, false, 15, 1, 4, 0.125, self.Material) end function ITEM:OnHolster(ply) SafeRemoveEntity(ply.TreeTrail) end function ITEM:Modify(modifications) PS:ShowColorChooser(self, modifications) end function ITEM:OnModify(ply, modifications) SafeRemoveEntity(ply.LolTrail) self:OnEquip(ply, modifications) end [/CODE] Thanks. Any help will help me out, as I am not the best at lua. But I try :p
[QUOTE=arandom;44099240]I am not the best at lua, but I can't seem to figure out what the problem here is. I tried adding new trails to my PointShop. In this case I used "nature/inftreec" for the material for my trail. When I bought it, it crashed my game. No error messages. Nothing, then every time I tried to join back, it would crash my game again as soon as I got on the server. The only sort of error is from the console which says: [IMG]http://i.imgur.com/3asW0G2.png[/IMG] This is my current code for the trail, if it helps. [CODE] ITEM.Name = 'Tree Trail' ITEM.Price = 200 ITEM.Material = 'nature/inftreec' function ITEM:OnEquip(ply, modifications) ply.TreeTrail = util.SpriteTrail(ply, 0, modifications.color, false, 15, 1, 4, 0.125, self.Material) end function ITEM:OnHolster(ply) SafeRemoveEntity(ply.TreeTrail) end function ITEM:Modify(modifications) PS:ShowColorChooser(self, modifications) end function ITEM:OnModify(ply, modifications) SafeRemoveEntity(ply.LolTrail) self:OnEquip(ply, modifications) end [/CODE] Thanks. Any help will help me out, as I am not the best at lua. But I try :p[/QUOTE] Your first fault is that you don't have an extension on the material name. Put nature/inftreec.vmt, also are you sure that this is an actual trail you can use.
Is this a trail you've made yourself or an already existing gmod material?
Sorry, you need to Log In to post a reply to this thread.