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!
Thank you again :)
But i got this problem now :(
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 :(
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 :) thank you ^^ both
Sorry, you need to Log In to post a reply to this thread.