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
gmod lua error
-
- New to forums
- Posts: 8
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Thu Nov 26, 2015 4:01 pm
Re: gmod lua error
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.
I ran into that issue once when I set up my server.
You can always contact the dev on his github page.
Re: gmod lua error
i found a solution