Hello facepunch i am trying to make a script where a button and some text is displayed and when you click the button a string comes up and whatever you enter is the text on the screen but i am having problems.
[QUOTE]
Laws = "Default Law"
DButton4 = vgui.Create( "DButton" );
DButton4:SetPos( 194, 32 )
DButton4:SetText( "Laws" )
DButton4:SetSize( 32, 20 )
DButton4.DoClick = function()
Derma_StringRequest("Add Law", "", Laws)
end[/QUOTE]
so this is where im having problems... is with the string... i honestly don't even know what im doing with the string... but i need what you enter in the string to = the variable Laws .
please help me... and thank you for your time! :pwn:
You are using a string when you should use a variable.
SetText("String") Outputs ---> String
SetText(Law) ---> Default Law
[QUOTE=Exho;45789746]You are using a string when you should use a variable.
SetText("String") Outputs ---> String
SetText(Law) ---> Default Law[/QUOTE]
okay so like this?
[QUOTE]DButton4 = vgui.Create( "DButton" );
DButton4:SetPos( 194, 32 )
DButton4:SetText( "Laws" )
DButton4:SetSize( 32, 20 )
DButton4.DoClick = function()
SetText("String") Outputs Laws
end[/QUOTE]
im sorry im not really good with strings yet
[editline]25th August 2014[/editline]
someone help... im pretty sure the guy above just told me how to change the name of a button lol. thats not what im trying to do... im trying to ENTER text in a STRING BOX and change the text on the screen by typing in the box in game.
[editline]25th August 2014[/editline]
[IMG]http://oi59.tinypic.com/szbsax.jpg[/IMG]
what i enter in this needs to change the text on the screen
[editline]25th August 2014[/editline]
marking this as solved... i figured it out by myself...
Sorry, you need to Log In to post a reply to this thread.