I am sending table in yellow to the client after doing an SQL query to retrieve what is in the first inventory slot.
When i print the table to the console it has a 1 with a colon next to it 1:
https://files.facepunch.com/forum/upload/420426/aca23dc0-af8c-45c9-b8da-019759fc618b/e25ac5c391ed73638dcec465e87bdbef.png
Please can someone explain what the difference is between the table in yellow and the one in blue (If there is one) because i'm having trouble working with the client side one as i wish to draw the value of it on the players HUD.
The table being sent to the client is actually a table inside another table (the blue is just a simple table). This is how SQL queries typically work. They return a table containing a table for each result found. To retrieve the data, simply do tbl[1].variable. For easier access, I recommend sending the inner table to the client instead of the full thing.
Thank you so much i was so confused. 😍
Sorry, you need to Log In to post a reply to this thread.