I have an SQL database that runs server side, and I am using the .net networking to send the table over to the client. However, once the client receives the table I’m not sure how to get the data from this table into what I need.
local recordsListViewNames = vgui.Create( “DListView”, MainPanel )
recordsListViewNames:SetMultiSelect( false )
recordsListViewNames:AddColumn( “Name” ):SetFixedWidth( ScreenScale(100) );
net.Start(“requestNamesFromDB”) --requests to get names from server - shared.lua
for i, n in pairs( net.ReadTable() ) do
recordsListViewNames:AddLine( n ) --I tried this, but it’s only printing “1”
The function ideally would print each of the contents of the table into a new line on the list view.
I used PrintTable(net.ReadTable()) to see what my table looks like:
Name = SteamName1
How would I loop through adding both SteamName1 and any others from my table to my list view?
(User was banned for this post ("Wrong Section - Try the DEVELOPER DISCUSSION for HELP with LUA code" - Kiwi))