Data Tables Help

So I’m working on an entity that when spawned, every player in the server draws a bunch of information on that entity. I have been using SetNWInt which works just fine, but it can create performance issues as it is not very optimized (the client pings the server every millisecond for the info instead of whenever it is changed). The solution is to use Data Tables, but when I set them up, the client can not find the variable, it only transmits across the server.

Here’s where I set them up in my Init.lua file.

function ENT:SetupDataTables()



And here’s an instance where I ask for one of the variables on the client (cl_init.lua).

local wpname = e:GetWPName()

draw.DrawText(wpname,"wpfont",pos2d.x,pos2d.y + 13 + yOffset,Color(color,a),TEXT_ALIGN_CENTER)

    When running this code I get an error - 

Now when getting the variables from the server’s side it works just fine, which means that it should be setting up the table correctly, but the client side just can’t do it.

Any help would be appreciated :slight_smile:

SetupDataTables should be shared.

Oh my God thank you it worked :), been trying to fix this for so long can’t believe that never occurred to me.