Derma not working

Hi, I’m trying to make my derma menu come up when you type “+showprofilemenu” in console, i’m using concommand.Add("+showprofilemenu", ShowMenu) but it just gives me
Unknown command: +showprofilemenu
And the most anoying part, there is no console errors at all so i have no idea what i should be trying to fix. The ShowMenu function is the one that contains all the vgui.Create functions. I’ll post the lua if you need it just ask. Thanks for any help

Try this in console.

lua_openscript_cl autorun/client/<script name>.lua

Replacing script name with your own, of course. And if it’s not in autorun/client, it should be.

Hi, ok i did this:
] lua_openscript_cl autorun/client/profile_menu.lua
Running script autorun/client/profile_menu.lua…
and nothing popped up yet there were no errors… any other ideas?

Edit: OK it seams i do get an error;
autorun/client/profile_menu.lua:21: attempt to call method ‘SteamID’ (a nil value)
I need to get the players steam id for some functions in my menu so im using LocalPlayer:SteamID() and i just realised this dont work on clients :stuck_out_tongue:
Is there another way to get steam id of a local player?

That means it is probably working, try it.

Lol, i just edited my post as you said that. It turns out i did get an error

Post line 21 of your code in lua format. If you are testing it in Single Player you can’t use Steam ID, I always use v:Nick and then I change it whenever I put it on a server.

The steamid line is line 21.

[lua]local plyer = LocalPlayer()
local steamid = plyer:SteamID()
local nick = plyer:Nick() [/lua]

Currently im tesing it on single player, but i was also testing it on a server and i still got the
Unknown command: +showprofilemenu
error, and lua_openscript_cl autorun/client/profile_menu.lua dosnt work on servers for me

lua_openscript_cl, as the name implies, opens the script clientside. lua_openscript opens it serverside, but the file has to be on the server, and the console has to be the server’s console.

Like Justin said, you can’t use :SteamID() client side. Change it. That’s why your script isn’t working; if there’s an error, only the stuff that was done before it will have been run, and your concommands are probably done after that line, so they aren’t being run. But change it anyway or your script wont completely work.

Yea, make it this for now.

[lua]local plyer = LocalPlayer()
local steamid = plyer:Nick()
local nick = plyer:Nick()

Or, just use this module

He may want to put it on a server to have people download it, and requiring modules for derma stuff on servers slims down the number of people who would be willing to download it. I for one wouldn’t download a module for a derma menu.

Me neither :3

You guys were right, the script wasnt working because of the steamid. It’s working now and i think i can make it work with just nick so i dont need that module, thanks for the help.

Use UniqueID() instead.