• Help me with Inventoryaddon!
    1 replies, posted
Hello I'm rebel. I am going to make trader system w/ InventoryAddons( Link : [url]http://www.facepunch.com/showthread.php?t=756662[/url] ). and i have some problem with this code! I make code Like This // Trade Code. function Trade() local tradelist = {} tradelist[1] = "items/CSS_AWP.lua" local TradeFrame = vgui.Create( "DFrame" ) TradeFrame:SetSize( 400, 700 ) TradeFrame:Center() TradeFrame:SetTitle( "Gundealer Miller J. Sword " ) TradeFrame:SetDraggable( true ) TradeFrame:ShowCloseButton( true ) TradeFrame:MakePopup() TradeFrame:SetPos( 5, 10 ) local TradeList = vgui.Create( "DPanelList", TradeFrame ) TradeList:SetPos( 5, 30 ) TradeList:SetSize( TradeFrame:GetWide() - 10, TradeFrame:GetTall() - 35 ) TradeList:SetSpacing( 9 ) TradeList:SetPadding( 8 ) TradeList:EnableHorizontal( true ) TradeList:EnableVerticalScrollbar( true ) for k, v in pairs( tradelist.Items ) do local SpawnIcon = vgui.Create( "SpawnIcon" ) SpawnIcon:SetModel( v.Model ) SpawnIcon:SetToolTip( "Name: " .. tradelist.Items[ k ].Name .. "\n" .. "Description: " .. tradelist.Items[ k ].Description ) SpawnIcon.DoClick = function() local OptionMenu = DermaMenu() OptionMenu:AddOption( "Buy Item", function() LocalPlayer():ConCommand( "InventoryAddon.AdminSpawnItem " .. k ) end ) OptionMenu:Open() end TradeList:AddItem( SpawnIcon ) end end concommand.Add("ent_trade",Trade) And I have problem in here! ---------------------------------------------------------------------------- function Trade() local tradelist = {} tradelist[1] = "items/CSS_AWP.lua" ---------------------------------------------------------------------------- and ---------------------------------------------------------------------------- for k, v in pairs( tradelist.Items ) do local SpawnIcon = vgui.Create( "SpawnIcon" ) SpawnIcon:SetModel( v.Model ) SpawnIcon:SetToolTip( "Name: " .. tradelist.Items[ k ].Name .. "\n" .. "Description: " .. tradelist.Items[ k ].Description ) ---------------------------------------------------------------------------- here. Gmod can't read what is name what is description! why gmod can't read that? Am i wrong? Please give me solution of this problem!
Could you possibly throw some [lua] tags around that?
Sorry, you need to Log In to post a reply to this thread.