• needing help with Two Errors
    2 replies, posted
[ERROR] lua/weapons/gdcw_intervention/shared.lua:133: 'end' expected (to close 'function' at line 80) near '<eof>' 1. unknown - lua/weapons/gdcw_intervention/shared.lua:0 Hello. So i Return to this corner and some of you will remember me - two errors i get with the sniper i have. And the first 3 lines from line 1 is: [code] (blank line) SWEP.Category = "BBB Community Weapons" SWEP.Author = "Sir. Abyssal2001 / Sir. Braden1996" [/code] The starting is line 79, and the ending is line 132 [CODE]function SWEP:SecondaryAttack() if not self.IronSightsPos then return end if self.Weapon:GetNextSecondaryFire() > CurTime() then return end bIronsights = not self:GetIronsights() self:SetIronsights( bIronsights ) if CLIENT then local scope = surface.GetTextureID("sprites/scope") function SWEP:DrawHUD() if self:GetIronsights() then surface.SetDrawColor( 0, 0, 0, 255 ) local x = ScrW() / 2.0 local y = ScrH() / 2.0 local scope_size = ScrH() local gap = 80 local length = scope_size surface.DrawLine( x - length, y, x - gap, y ) surface.DrawLine( x + length, y, x + gap, y ) surface.DrawLine( x, y - length, x, y - gap ) surface.DrawLine( x, y + length, x, y + gap ) gap = 0 length = 50 surface.DrawLine( x - length, y, x - gap, y ) surface.DrawLine( x + length, y, x + gap, y ) surface.DrawLine( x, y - length, x, y - gap ) surface.DrawLine( x, y + length, x, y + gap ) local sh = scope_size / 2 local w = (x - sh) + 2 surface.DrawRect(0, 0, w, scope_size) surface.DrawRect(x + sh - 2, 0, w, scope_size) surface.SetDrawColor(255, 0, 0, 255) surface.DrawLine(x, y, x + 1, y + 1) surface.SetTexture(scope) surface.SetDrawColor(255, 255, 255, 255) surface.DrawTexturedRectRotated(x, y, scope_size, scope_size, 0) else return self.BaseClass.DrawHUD(self) end end function SWEP:AdjustMouseSensitivity() return (self:GetIronsights() and 0.2) or nil end end [/CODE]
put an "end" before "if CLIENT then"
I must have scanned that around 3 times and not found that xD - thanks for the help
Sorry, you need to Log In to post a reply to this thread.