• Error: Trying to network unacceptable type (table)
    10 replies, posted
Error: Trying to network unacceptable type (table) this error gets spammed to my console I dunno what is the reason. My searches say that if you do something like: entity:SetNWEntity("idofthis",TABLE) that error occurs. I tried to overwrite all setnw data things and try to see if any table type thing gets networked but couldnt find it. I wish somebody knows the reason..
There's no possible way to attach table on entity by SetNW...() functions. You can use net.WriteTable() and sync by net.
As Spar said, first of there is NO NW var that can be set as an entity, see all the SetNW functions: https://files.facepunch.com/forum/upload/1348/a3b49d10-8830-49e4-bdd1-a33c7b1694fe/image.png Second, the SetNWEntity, as it's own name says, Is used to set networked ENTITY VALUES, not tables: https://files.facepunch.com/forum/upload/1348/8d46455b-20f8-45f4-b6f2-a7a796f653b9/image.png
It is sad that you both couldnt understand my problem. I dont know if its a problem of my telling but I guess so.. I am telling that my server gets an error called "Error: Trying to network unacceptable type (table)" and as my searches say it is because a code that trys to do something like this: entity:SetNWEntity("id",type TABLE) it is not me who typed a code like that, its one of my addons I guess. The problem is I dont know which and I am seeking for a way to find it. Thank you both for trying to help.
How exactly did you try to override the SetNWx functions? Can you show us the code you ran, because detouring those functions and checking the input should tell us what's causing the issue.
Heres what I coded; local ENTITY = FindMetaTable("Entity") local to_detour = {"Angle","Bool","Entity","Float","Int","String","VarProxy","Vector"} old_nwxs = old_nwxs or {} for _, x in pairs(to_detour) do if not old_nwxs[x] then old_nwxs[x] = ENTITY["SetNW"..x] ENTITY["SetNW"..x] = function(self, id, data) if (type(data)=="table") then print(":: Wrong usage found! > SetNW"..x.." <") print(":: Source > "..debug.getinfo(2).short_src.." <") end return old_nwxs[x](self, id, data) end end end I put it to the end of lua/includes/init.lua but still no warnings.. I tested the code on my local dedicated server, something odd happened. I was not getting Trying to network unacceptable type (table) errors on my local server but after I run the detouring code, it started to spam the error with same interval of 10 seconds, over and over. I guess when you do that mistake for once, it spams it for all the time. By the way I dont get the wrong usage message on my real server. https://puu.sh/CucV1/6b8dcb17d2.png
SetNW...'s use "Lua on C". And they're more powerful rather if you recreate them. What you're really want to do?
find the source of that error, fix it
Are you sure it's not a random addon that's causing this issue? Have you tried removing them etc.? -> If not, remove half of them, if the error still occurs, remove the other half etc. I never saw this kind of issue.
Send code here
yea I never saw it too. thank you for the suggestion.
Sorry, you need to Log In to post a reply to this thread.