DarkCoveR / darkrp

Automatically exported from code.google.com/p/darkrp
0 stars 0 forks source link

Lua error #374

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Timer Error: gamemodes\darkrp\gamemode\main.lua:513: bad argument #1 to 
'SetModel' (string expected, got no value)

And this is the function its in.

        timer.Simple(1, function(ply, ent)
                if ValidEntity(ply) and ValidEntity(ent) then
                        ply:DropWeapon(ent) -- drop it so the model isn't the viewmodel

                        local weapon = ents.Create("spawned_weapon")
                        weapon.ShareGravgun = true
                        weapon:SetPos(ply:GetShootPos() + ply:GetAimVector() * 30)
                        weapon:SetModel(ent:GetModel())
                        weapon:SetSkin(ent:GetSkin())
                        weapon.weaponclass = ent:GetClass()
                        weapon.nodupe = true
                        weapon:Spawn()

Original issue reported on code.google.com by c_u_late...@hotmail.com on 8 Jul 2010 at 12:44

GoogleCodeExporter commented 8 years ago
Things like this make me wonder how the fuck a weapon can have no model.

Original comment by fpeijnen...@gmail.com on 8 Jul 2010 at 8:24

GoogleCodeExporter commented 8 years ago

ERROR: GAMEMODE:'HUDWeaponPickedUp' Failed: 
gamemodes\base\gamemode\cl_hudpickup.lua:17: attempt to call method 
'GetPrintName' (a nil value)

When changing job sometimes.

Original comment by c_u_late...@hotmail.com on 9 Jul 2010 at 12:41

GoogleCodeExporter commented 8 years ago
100 DarkRP dollars say it's a custom team using custom weapons. 

Original comment by fpeijnen...@gmail.com on 9 Jul 2010 at 7:51

GoogleCodeExporter commented 8 years ago

ERROR: GAMEMODE:'HUDWeaponPickedUp' Failed: 
gamemodes\base\gamemode\cl_hudpickup.lua:17: attempt to call method 
'GetPrintName' (a nil value)

Got random demoted from CP then team unbanned myself and changed back, got this.

Original comment by ch...@watersideway.plus.com on 13 Jul 2010 at 10:26

GoogleCodeExporter commented 8 years ago
Were you carrying any custom weapons?

Original comment by fpeijnen...@gmail.com on 13 Jul 2010 at 10:37

GoogleCodeExporter commented 8 years ago
Not as the citizen, but the CP class has a USP instead of a glock.

Original comment by ch...@watersideway.plus.com on 13 Jul 2010 at 2:37

GoogleCodeExporter commented 8 years ago
that's the problem.

Original comment by fpeijnen...@gmail.com on 13 Jul 2010 at 2:40