New to Derma, am I just stupid?

So, ingame, I am running some commands to test making a frame because well I’ve never taken the time to mess with derma, but now I need to… Here’s what I’m doing from console and the output, can anyone tell me what I am doing wrong?

] lua_run_cl DermaPanel = vgui.Create(“DFrame”);
] lua_run_cl DermaPanel.SetPos(50,50)
[@LuaCmd:1] bad argument #1 to ‘SetPos’ (Panel expected, got number)

Yes you are stupid.

Go to lua/autorun/client/ create a file called Whatsoever.lua

Then put the code in there, then save it.

lua_run_cl doesn’t save from command to command. lua_Run does. But it’s serverside.

Oh ok,

[editline]7th March 2011[/editline]

Well I just did what you said, in a file and it is still giving the same error?

It’s Dermapanel**:**SetPos. Don’t use a dot.

[editline]7th March 2011[/editline]

Also don’t forget to set the size.

And if you want to open it trough the console use concommand.Add(“Whatsoever”, FunctionName)

Derma Guide - Wiki
The wiki is your friend.

Just for future reference, everytime you use a “.” instead of a “:” you have to put the thing you are modifying as the first argument. So this would also work, but just be redundant to do:

DermaPanel.SetPos( DermaPanel, 50, 50 )

[editline]7th March 2011[/editline]

Also, don’t bash the guy, at least he’s not as ignorant as this person:

He asked if he was stupid and I just told him that he was stupid because he asked if he was. :>

Thanks for all the help, I have been messing with too many languages, and havent been on lua for a while lol… Remembering multiple syntaxes SUCKS

no need to be a cunt

Everyone listen to Jova!

No, seriously, I can do what ever I want.

I don’t think overv would agree to that :v:

Where’s the “Autistic” rating when you need one :stuck_out_tongue:

why would you use lua_run >.< use usermessages or concommands

or just take 2 seconds to create a lua file in autorun and do it that way. I find that much easier.

I want to find it myself ):

I find it amusing that everyone in this thread who acts like they know something have been wrong except for Staneh and Chief Tiger:laugh:

You seriously have no idea what you’re talking about, do you?

I’d suggest Luapad.
Just make sure to keep another backup every now and then, or you might click the close button and lose all your work.