I came across this code from years while looking for a lighter to use, I've tried to fix it up myself but have had no luck
[ERROR] addons/darkrp modification/lua/weapons/weapon_lighter/shared.lua:38: malformed number near '100thenlocal'
1. unknown - addons/darkrp modification/lua/weapons/weapon_lighter/shared.lua:0
Any help is appreciated
if CLIENT then
SWEP.PrintName = "Lighter"
SWEP.Slot = 2
SWEP.SlotPos = 2
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = trueend
SWEP.Author = ""
SWEP.Instructions = "Left click to attempt to ignite somthing."
SWEP.Contact = ""
SWEP.Purpose = ""
SWEP.ViewModelFOV = 62
SWEP.ViewModelFlip = false
SWEP.ViewModel = Model("models/weapons/c_crowbar.mdl")
SWEP.WorldModel = Model("models/weapons/w_crowbar.mdl")
SWEP.UseHands = true
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.Sound = Sound("physics/wood/wood_box_impact_hard3.wav")
SWEP.Primary.ClipSize = -1-- Size of a clip
SWEP.Primary.DefaultClip = 0-- Default number of bullets in a clip
SWEP.Primary.Automatic = false-- Automatic/Semi Auto
SWEP.Primary.Ammo = ""
SWEP.Secondary.ClipSize = -1-- Size of a clip
SWEP.Secondary.DefaultClip = -1-- Default number of bullets in a clip
SWEP.Secondary.Automatic = false-- Automatic/Semi Auto
SWEP.Secondary.Ammo = ""function SWEP:PrimaryAttack()
self.Weapon:SetNextPrimaryFire(CurTime() + 1)
rand = math.random(1, 7)
local trace = self.Owner:GetEyeTrace()
local e = trace.Entity
if trace.HitPos:Distance(self.Owner:GetShootPos()) < 100thenlocal snd = {1,3,4}
self:EmitSound("ambient/energy/spark".. tostring(snd[math.random(1, #snd)]) ..".wav", 50, 100)
if IsValid(e) and SERVER and rand == 1and !e:IsVehicle() and e.Ignite then
e:Ignite(30,1) -- what I understand this is to light cars on fire...end
Facepunch code tags are screwed up at the moment, so it seems you copied a condensed version of the code. You'll have to respace everything out, including "100thenlocal" into "100 then local"
Yeah, I noticed that some things seemed out of place. spacing the "100thenlocal" was one of the first things I did to try and fix it.
Sorry, you need to Log In to post a reply to this thread.