Ulysses
		General => Developers Corner => Topic started by: xSylar on July 22, 2013, 02:14:38 PM
		
			
			- 
				I am trying to make a menu and I am getting Script errors that I have no idea what they are.
 here is the Code
 local BackGround = vgui.Create( "DFrame" )
 BackGround:SetSize( 1000,500 )
 BackGround:SetPos( 50,50 )
 BackGround:SetTitle("Menu")
 BackGround:SetDraggable( true )
 BackGround:ShowCloseButton( true )
 BackGround:MakePopup()
 BackGround:SetVisible( true )
 BackGround.Paint
 draw.RoundedBox( 6, 100, 50, 100, 23, Color( 255, 255, 255, 150 ) )
 
 I dont understand really the code of the RoundedBox so i just took it off the Gmod Wiki.
 Here is the errror
 
 [ERROR] lua/autorun/client/menu.lua:10: '=' expected near 'draw'
 1. unknown - lua/autorun/client/menu.lua:0
 
 
 
 Please help!!
- 
				if you want to modify the paint hook of the DFrame control you have to do it inside of a function. Try this:
 
 BackGround.Paint = function()
 draw.RoundedBox( 6, 100, 50, 100, 23, Color( 255, 255, 255, 150 ) )
 end
 
- 
				if you want to modify the paint hook of the DFrame control you have to do it inside of a function. Try this:
 
 BackGround.Paint = function()
 draw.RoundedBox( 6, 100, 50, 100, 23, Color( 255, 255, 255, 150 ) )
 end
 
 
 
 Thanks it helped a lot.
 and you would you know how to fix a DComboBox
 
 local TestingComboBox = vgui.Create( "DComboBox", BackGround )
 TestingComboBox:SetPos( 10, 35 )
 TestingComboBox:SetSize( 100, 185 )
 TestingComboBox:SetMultiple( false )
 TestingComboBox:AddItem( "Add" ) -- Add our options
 TestingComboBox:AddItem( "Some" )
 TestingComboBox:AddItem( "Options" )
 TestingComboBox:AddItem( "Here" )
 and the SetMultiple is an error
 a nill value or something close to that
- 
				This control was modified for GMod13.
 
 Take a look at the official wiki.
 http://wiki.garrysmod.com/page/Libraries/vgui/element/DComboBox
 
 I can tell by the example that you used that you're using the old wiki. This one may have more documentation, but its sometimes outdated. Always check the new wiki too.