Discord
Steam
/
Garry's Mod
/
Developers
/
attempt to con..
Login/Join
Event Log
attempt to concatenate global 'Catrig' (a nil value)
2 replies, posted
Search
In This Thread
function ENT:Draw() local Catrig = self:GetCatrig() end function DrawTheMenu( ent ) local Frame = vgui.Create( "DFrame" ) Frame:SetTitle( "Принтер "..owner.."'а" ) Frame:SetSize( 500, 500 ) Frame:Center() Frame:MakePopup() Frame.Paint = function( self, w, h ) draw.RoundedBox( 0, 0, 0, w, h, Color( 60, 60, 60 ) ) draw.RoundedBox( 0, 0, 0, w, 25, Color( 80, 80, 80 ) ) end local Button = vgui.Create( "DButton", Frame ) Button:SetText( "Улучшить" ) Button:SetTextColor( Color( 255, 255, 255 ) ) Button:SetPos( 100, 100 ) Button:SetSize( 100, 30 ) Button.Paint = function( self, w, h ) draw.RoundedBox( 0, 0, 0, w, h, Color( 41, 128, 185, 250 ) ) end Button.DoClick = function( ) print( Catrig ) end end Shortened Help Please!
Catrig isn't local to the draw function. Try self.Catrig = self:GetCatrig()
Thanks, but I already managed to do it, I just passed the zero variable local Catrig function ..... Catrig = Self:GetCatrig()
Sorry, you need to
Log In
to post a reply to this thread.