• developer_functions.lua is erroring.
    6 replies, posted
[code] [lua\autorun\developer_functions.lua:46] attempt to call method 'IsAdmin' (a nil value) [/code] For some reason I'm getting this error when calling certain functions like: function meta:IsCP() This is a shared function, it is not just serverside.
If you do not give us your script and the line on the posted script that is causing the area.
internal garrsmod file
My bad. Take a look, [url]http://luabin.overvprojects.nl/?path=/lua/autorun/developer_functions.lua[/url]
[lua] local function Find( ply, command, arguments ) if ( ply && !ply:IsAdmin() ) then return end if ( !arguments[1] ) then return end if ( SERVER ) then Msg("Finding '", arguments[1], "' SERVERSIDE:\n\n") else Msg("Finding '", arguments[1], "' CLIENTSIDE:\n\n") end FindInTable( _G, arguments[1] ) FindInTable( _R, arguments[1] ) Msg("\n\n") if ( SERVER && ply ) then RunConsoleCommand( "lua_find_cl", tostring(arguments[1]) ); end end [/lua] Line 3 on the function, is where the error occures (46 of original file). I don't want to post the whole script, as I didn't write it and can't release it without permission. The line that calls the find function would be: [lua] return !!self:GetRank():lower():find("supporter")[/lua]
Why would you have not not self:GetRank()blabla ? Wouldn't that just.. Give the same result as if you didn't have !! ? Unless it returns a string. And you could use tobool in that case. I'm confusing myself.
Post your meta code.
Sorry, you need to Log In to post a reply to this thread.