• Datatables issue
    2 replies, posted
Hello facepunch. I'm currently facing an issue that has stumped me for a long time now. I make a network var named printer_speedlevel like the following: function ENT:SetupDataTables() self:NetworkVar("Int",3,"printer_speedlevel") end But then inside of my ENT:Touch function i use this: if self:Getprinter_speedlevel() < 3 then if ent.i_speed then ent:Remove() self:Setprinter_interval(self:Getprinter_interval()-interactive_config.IntvUpgrade) self:Setprinter_speedlevel(self:Getprinter_speedlevel()+1) end end and i am setting the level to 1 in my ENT:Initialize function. But here is my issue, When i drop the entity onto my printer, it does not work as i planned and dedcides to add 2 levels instead of 1. Or so it seems. for instance by default the time is at 10s and once i add the upgrade it drops to 8 and does not let me drop any more upgrades onto the printer. Any help is greatly appreciated as this is really frustrating.
The entity isn't being delete until the next tick so ENTITY is being called again, use ENTITY instead.
omg, you're literally a life saver lmao. Thank you so much
Sorry, you need to Log In to post a reply to this thread.