• Damage logs.
    6 replies, posted
So, i'm getting issues with the logs. whenever i access them it gives me lua errors. I went in the console of the server and found this to be the problem. "Lua Error: Couldn't read type 6" I'm not sure where the file that gives this error is located though. I was hoping someone knew. Thanks! EDIT* Found the error don't know how to fix it though! [ERROR] lua/includes/modules/net.lua:92: table index is nil 1. ReadType - lua/includes/modules/net.lua:92 2. ReadType - lua/includes/modules/net.lua:90 3. ReadType - lua/includes/modules/net.lua:90 4. ReadType - lua/includes/modules/net.lua:90 5. ReadTable - lua/includes/modules/net.lua:90 6. func - addons/damagelog-master/lua/cl_tabs/old_logs.lua:238 7. unknown - lua/includes/modules/net.lua:31 This here is the net.lua file. it starts from line 78 and finishes at 96 [CODE]function net.ReadTable() local tab = {} while true do local t = net.ReadUInt( 8 ) if ( t == 0 ) then return tab end local k = net.ReadType( t ) local t = net.ReadUInt( 8 ) if ( t == 0 ) then return tab end local v = net.ReadType( t ) tab[ k ] = v end end[/CODE] This is the same file but from line 16 to 33 [CODE]function net.Incoming( len, client ) local i = net.ReadHeader() local strName = util.NetworkIDToString( i ) if ( !strName ) then return end local func = net.Receivers[ strName:lower() ] if ( !func ) then return end -- -- len includes the 16 byte int which told us the message name -- len = len - 16 func( len, client ) end[/CODE] And finnaly this is the damagelog file from lines 237 to 242 [CODE]net.Receive("DL_SendLogsList", function() Damagelog.CurLogsTable = net.ReadTable() if ValidPanel(Damagelog.OldLogs) then Damagelog.OldLogs:UpdateDates() end end)[/CODE] Please help! thanks!!
You are trying to send a function in your table.
Could you be more specific? I'ma nub at lua
I couldn't be more specific, I told you exactly what your problem is.
That code seems a little bit complex for someone who claims to be a noob at GLua, so I'm assuming you got it from elsewhere. Have you tried to contact the creator of it?
"Doctor there's blood everywhere, what's wrong?!" "You have a plank of wood impaled in your eye." "... Could you be more specific?"
To add on to what Robot said; use Notepad++ and search ALL *.lua files in the game-mode directory for "DL_SendLogsList" without the ""s. You'll see all places where it WRITES / SENDS the data. Look for any of those networking things which is trying to send a function, change the code so it doesn't send a function.
Sorry, you need to Log In to post a reply to this thread.