ply:IsSuperadmin() nil value?? Help please.

So I need to check if a player is superadmin for something so to test it out i directly copied this code from the gmod wiki. However whenever i run the console command i get told ply:IsSuperadmin is a nil value by the lua errors in console?

Whats wrong? Is the wiki incorrect or am I doing something stupid here?

Anyway here is the code I copied, I put in in shared.lua in the autorun folder:

function SuperAdminCheck(ply, cmd, args)
if ply:IsSuperadmin() then //Checks if the player is a super admin
ply:ChatPrint(“You are a Super Admin on this server!”) // prints in the chat that he is an admin
elseif ply:IsAdmin() then // Checks if the player is an admin
ply:ChatPrint(“You are an Admin on this server!”) // prints in chat that he is an admin
else
ply:ChatPrint(“You are a normal Player!”) // prints in chat to normal players
end
end
concommand.Add(“SACheck”, SuperAdminCheck)

Lua is CaSe SeNsItIvE, ply:IsSuperadmin() should be ply:IsSuperAdmin()

Ah, someone should correct this on the wiki

Done.

Hi, I am Andres Kramack from http://www.cathybarryadultstore.com/.

It’s a ‘pleasure’ serving the public if you know what I mean and this message is

Here at Cathy Barry Adult Store, we offer a wide variety of dildos that come in all sizes from goblin-sized dicks to black-man draconic dicks. I know at Facepunch everyone loves good old dicks which is why I personally offer anyone with an association with Facepunch Forums a 50% discount code “DIL4FACEPUNCH”. Don’t forget, this offer lasts until the next Garry’s Mod update which we so much love.

Here are pictures of our products just for you!

Sponsored Images:

http://static.fjcdn.com/pictures/Gym+leaders+hate+him_ab471d_5017861.jpg

https://static.fjcdn.com/comments/That+one+with+the+lamp+got+me+_e68beb19422eea14289caa5f4d6dffb7.jpg

Got any questions? Visit my Steam Profile!