• net.ReadType: Couldn't read type
    5 replies, posted
Hello, i've recently made an addon for my server, i've tested it on single player and it works fine but when i test it on my server every player recieves this messege (PS: Its an entity and when you use it it brings up a derma panel): [ERROR] lua/includes/extensions/net.lua:182: net.ReadType: Couldn't read type 97   1. error - [C]:-1    2. ReadType - lua/includes/extensions/net.lua:182     3. ReadType - lua/includes/extensions/net.lua:124      4. ReadTable - lua/includes/extensions/net.lua:124       5. func - lua/entities/obj_npcroute.lua:810        6. unknown - lua/includes/extensions/net.lua:32 Code: cl_init.lua include("shared.lua") function ENT:Draw()   self:DrawModel() local offset = Vector( 0, 0, 70 ) local ang = LocalPlayer():EyeAngles() local pos = self:GetPos() + offset + ang:Up() ang:RotateAroundAxis( ang:Forward(), 90 ) ang:RotateAroundAxis( ang:Right(), 90 )    cam.Start3D2D( pos, Angle( 0, ang.y, 90 ), 0.50 )    draw.DrawText( "Arrest Transmitter", "TargetID", 2, 2, Color(255,255,255), TEXT_ALIGN_CENTER )    cam.End3D2D() end net.Receive( "entused", function() local Frame = vgui.Create( "DFrame" ) Frame:SetTitle( "Arrest Menu" ) Frame:SetSize( 180, 250 ) Frame:Center() Frame:MakePopup() Frame.Paint = function( self, w, h )  draw.RoundedBox( 0, 0, 0, w, h, Color( 231, 76, 60, 150 ) )  end local DLabel = vgui.Create( "DLabel", Frame) DLabel:SetPos( 40, 60 ) DLabel:SetText( "Name:" ) local nameentry = vgui.Create( "DTextEntry", Frame) nameentry:SetPos( 70, 60) nameentry:SetSize( 80, 20 ) local reasonlabel = vgui.Create( "DLabel", Frame) reasonlabel:SetPos( 30, 100 ) reasonlabel:SetText( "Reason:" ) local reasonentry = vgui.Create( "DTextEntry", Frame) reasonentry:SetPos( 70, 100) reasonentry:SetSize( 80, 20 ) local timelabel = vgui.Create( "DLabel", Frame) timelabel:SetPos( 27, 140 ) timelabel:SetText( "Minutes:" ) local timeentry = vgui.Create( "DTextEntry", Frame) timeentry:SetPos( 70, 140) timeentry:SetSize( 80, 20 ) local arrestbutton = vgui.Create( "DButton", Frame) arrestbutton:SetText( "Arrest" ) arrestbutton:SetPos( 70, 185 ) arrestbutton:SetSize( 80, 30 ) arrestbutton.DoClick = function() name = nameentry:GetValue() reason = reasonentry:GetValue() timenotchanged = timeentry:GetValue() timeminutes = util.StringToType( timenotchanged, "int" ) timeseconds = timeminutes*60 LocalPlayer():ConCommand( "say" .. " /advert" .. " Name: " .. name .. " Reason: " .. reason .. " Minutes: " .. timeminutes ) timer.Create( "UniqueName2", timeseconds, 1, function()   LocalPlayer():ConCommand( "say" .. " I Should release " .. name ) end ) end end ) init.lua AddCSLuaFile("shared.lua") AddCSLuaFile( "cl_init.lua" ) include("shared.lua") function ENT:Initialize()    self:SetModel( "models/lt_c/sci_fi/rails_48.mdl" )    self:PhysicsInit( SOLID_VPHYSICS )    self:SetMoveType( MOVETYPE_VPHYSICS )    self:SetSolid( SOLID_VPHYSICS )    local phys = self:GetPhysicsObject()    if (phys:IsValid()) then     phys:Wake()   end   util.AddNetworkString( "entused" ) end function ENT:Use( activator, caller ) if IsValid( caller ) and caller:IsPlayer() then timer.Create( "UniqueName2", 0.1, 1, function() net.Start( "entused" ) net.Send( caller ) end ) end end
where is obj_npcroute.lua?
I didn't code that thought and before i uploaded my addon it was working fine
I've deleted the addon but still it doenst show up on the q menu
Sorry, you need to Log In to post a reply to this thread.