Cant understand why this error is happening.

Hey,

I’m getting this strange error


[ERROR] lua/vgui/dmenu.lua:60: bad argument #1 to 'SetText' (string expected, got nil)

I have no idea how to fix it.
Here’s the code its complaining about.
[LUA]
–Kick Button
local KickButton = vgui.Create(“DButton”)
KickButton:SetParent( MainPanel )
KickButton:SetText( “Kick Player” )
KickButton:SetPos( 160, 355)
KickButton:SetSize( 150, 35 )
KickButton.DoClick = function ( btn )

	local KickButtonOptions = DermaMenu() 
		for k,v in pairs(player.GetAll()) do			
		
			KickButtonOptions:AddOption(f, function() RunConsoleCommand("kick", v:Nick()) end )
					
		end
		KickButtonOptions:Open() 
		
	end[/LUA]

This worked FINE earlier.

f doesn’t exist. You might want to replace it with v:Nick().

Thanks,
Also I’ve banned my self from Singleplayer by accident.

How would I undo this?

It depends how you’ve banned yourself. you’re going to have to find the banlist for the method you used to ban yourself.

Admin mods and console commands can have different ban methods.

(Check your data folder admin mods often store stuff like this into there)

Oh its just a default “Source banid”

Edit:

Its just Singleplayer.