• making a player-run shop. can't save the items.
    0 replies, posted
I'm tying to make a player-run shop, but the values won't save. I can get them to appear on there but when I close it, it disappears. here's a portion of my code: [lua] local PlayerShop = vgui.Create( "DPanel" ) local DermaListView = vgui.Create("DListView",PlayerShop) DermaListView:SetParent(PlayerShop) DermaListView:SetPos(0,25) DermaListView:SetSize(450,450) DermaListView:SetMultiSelect(false) DermaListView:AddColumn("Item") DermaListView:AddColumn("Seller") DermaListView:AddColumn("Price") --for k,v in pairs(Sales) do -- DermaListView:AddLine(v.Item,v.Seller,v.Price) --end local Sell = vgui.Create("DPanel") local WangLabel = vgui.Create("DLabel", Sell) WangLabel:SetText("Price") WangLabel:SetPos(50,40) local Wang = vgui.Create( "DNumberWang", Sell ) Wang:SetPos( 50, 50 ) local Text = vgui.Create("DTextEntry", Sell) Text:SetText("Object") Text:SetPos(50,100) Text:SizeToContents() local button2 = vgui.Create( "DButton", Sell ) button2:SetSize( 150, 50 ) button2:SetPos( 50, 200 ) button2:SetText( "Complete Form" ) button2:SetParent( Sell ) button2.DoClick = function( button2 ) surface.PlaySound( "ui/buttonclickrelease.wav" ) DermaListView:AddLine(Text:GetValue(),ply:Nick(),Wang:GetValue()) end[/lua] as you can see, I'm making a list which gets it's values when a player clicks the "Complete Form" button. it works, but it doesn't save the values. I'm trying to add a table, but I don't know how I would do it. any suggestions?
Sorry, you need to Log In to post a reply to this thread.