Pretty much my entity isn't setting up the DTVars right i have this in my shared.lua [lua] function ENT:SetupDataTables()
self:DTVar( "Int", 0, "Team" )
self:DTVar( "Int", 1, "Score_Team_1" )
self:DTVar( "Int", 2, "Score_Team_2" )
self:DTVar( "Int", 3, "Score_To_Win" )[/lua]
and in my Initialize function [lua]self:SetDTInt(0,0)
self:SetDTInt(1,0)
self:SetDTInt(2,0)
self:SetDTInt(3,10)[/lua] I've tried both using the string and the int id. I'm getting no errors and any help is thanked.
How are you checking the variables?
Are you accessing it like self.dt.Team self.dt.Score_Team_1?
He is accesing them like NWVars. By the way can all the setNWSomething be replaced by SetDTSomething in a gamemode?
I'm pretty sure datatables only apply to entities and you cannot use them in the normal gamemode. Correct me if I am wrong.
You should access DTVars via the way I demonstrated though :).
Sorry, you need to Log In to post a reply to this thread.