Lua error message in console


I get this message in console.

[gamemodes\westernrp\gamemode\sv_ply_functions.lua:106] attempt to index field ‘?’ (a nil value)(Hook: PlayerSpawn)

This is the code chunk here:

function pmeta:LoadOut()


    self:Give( "weapon_physgun" ) 
    self:Give( "gmod_rp_hands" )
    self:Give( "gmod_rp_keys" )

   LINE 106: for k, v in pairs( Jobs[self:getJob()][6] ) do
        self:Give( v )

Other problem is:

In console getting spammed is Unknown Command: derma_skin

And last problem is:

Everytime I try to add something of custom content into the game it never shows up.

WesternRP > content > models

Thats the right format right? Do I have to call the models in the lua file?

Any ideas?

  • TNO

Try printing what:


returns. It should return a table or the loop won’t work.

Oh and it’s better to use the [noparse][lua][/lua][/noparse] tags, makes it easier for us.