• Getting nil value in old addon.
    3 replies, posted
I'm attempting to convert an addon to GMOD 13, but an error shows up; [CODE] [ERROR] 1. unknown - [C]:-1 Error in hook PlayerFootstep: addons/floras bf3 vault/lua/autorun/client/css_legs.lua:901: attempt to call global 'SinglePlayer' (a nil value) stack traceback: addons/floras bf3 vault/lua/autorun/client/css_legs.lua:901: in function 'v' lua/includes/modules/hook.lua:84: in function <lua/includes/modules/hook.lua:67> [C]: in function '•&#8298;&#8206;&#8301;&#8203;&#8236;&#8303;&#8234;•' [ERROR] 1. unknown - [C]:-1 [/CODE] on this line of lua: [CODE] function SlideFoot( ply, pos, foot, sound, volume, rf ) if not SinglePlayer() then if ply.Sliding then return true end end end [/CODE]
Should be game.SinglePlayer()
Should the SinglePlayer() code not be game.SinglePlayer() ([url]https://wiki.garrysmod.com/page/game/SinglePlayer[/url])?
This page will help you with most of the problems [url]http://wiki.garrysmod.com/page/Updating_Scripts_From_GMod_12_to_GMod_13[/url] The addon has been fixed before, but good luck with that
Sorry, you need to Log In to post a reply to this thread.