gmod lua error

Post Reply
Capin
New to forums
New to forums
Posts: 8
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Thu Nov 26, 2015 4:01 pm

gmod lua error

Post by Capin »

I cant seem to figure out how to fix this. i get an error in my console on the server

[ERROR] gamemodes/nutscript/gamemode/core/hooks/cl_hooks.lua:328: attempt to call method 'CalcView' (a nil value)
1. CalcView - gamemodes/nutscript/gamemode/core/hooks/cl_hooks.lua:328
2. unknown - gamemodes/nutscript/gamemode/core/hooks/cl_hooks.lua:328



function GM:CalcView(client, origin, angles, fov)
local view = self.BaseClass:CalcView(client, origin, angles, fov) or {}
local entity = Entity(client:getLocalVar("ragdoll", 0))
local ragdoll = client:GetRagdollEntity()

if ((!client:ShouldDrawLocalPlayer() and IsValid(entity) and entity:IsRagdoll()) or
(!LocalPlayer():Alive() and IsValid(ragdoll))) then
local ent = LocalPlayer():Alive() and entity or ragdoll
local index = ent:LookupAttachment("eyes")

if (index) then
local data = ent:GetAttachment(index)

if (data) then
view.origin = data.Pos
view.angles = data.Ang
end

return view
end
end

return self.BaseClass:CalcView(client, origin, angles, fov)
end
Rone
A regular
A regular
Posts: 40
Joined: Fri Oct 10, 2014 12:28 pm

Re: gmod lua error

Post by Rone »

I don't know if this is the issue, but you need to set your gamemode to whatever schema you're using instead of nutscript itself.
I ran into that issue once when I set up my server.


You can always contact the dev on his github page.
Capin
New to forums
New to forums
Posts: 8
Joined: Thu Nov 26, 2015 4:01 pm

Re: gmod lua error

Post by Capin »

i found a solution
Post Reply