Derma - TextEntry problem

I have another problem ><
I made this:

local DermaText1 = vgui.Create( “DTextEntry”, TAB7 )
DermaText1:SetPos( 20,25 )
DermaText1:SetTall( 20 )
DermaText1:SetWide( 120 )
DermaText1:SetEnterAllowed( true )
DermaText1:SetText(“text”)
DermaText1.OnEnter = function()
RunConsoleCommand( "name " , “DermaText1:GetValue()” ) end

And i am not sure that i must use RunConsole Command.My purpose is that when i enter something
in the text menu ingame, the text i entered is ran in the console with "name " before it.For example:
i have entered " dog " in the menu,
then when i press enter, the console recieves the command
“name dog”
Please help me again.
Thank you!

[lua]
local DermaText1 = vgui.Create( “DTextEntry”, TAB7 )
DermaText1:SetPos( 20,25 )
DermaText1:SetTall( 20 )
DermaText1:SetWide( 120 )
DermaText1:SetEnterAllowed( true )
DermaText1:SetText(“text”)
DermaText1.OnEnter = function()
RunConsoleCommand( "name " , DermaText1:GetValue()) end
[/lua]

Thank you again :slight_smile:

But i got this problem now :frowning:

RunConsoleCommand: Command has invalid characters! (fairy_name (’ ))
The first parameter of this function should contain only the command, the second command should contain argument.

And this code i used

local DermaText1 = vgui.Create( “DTextEntry”, TAB7 )
DermaText1:SetPos( 20,25 )
DermaText1:SetTall( 20 )
DermaText1:SetWide( 120 )
DermaText1:SetEnterAllowed( true )
DermaText1:SetText(“Ime”)
DermaText1.OnEnter = function()
RunConsoleCommand( "fairy_name " , DermaText1:GetValue())
end

Help me again :frowning:

I’m not sure if it matters, but maybe removing the space after fairy_name would work? Not sure though, never really used DTextEntry.

Yes, you need to remove that space.

lol it worked just fine :slight_smile: thank you ^^ both