Net Library question.

Hey, does anyone know if theres a way of sending more than one net.WriteEntity() then sending a message to server?

Just call WriteEntity more than once; when you go to read the value you’ll need to remember that they are all sent in order.

net.WriteEntity( 1 )
net.WriteEntity( 2 )
net.WriteEntity( 3 )

and on the other end:

local ent1 = net.ReadEntity( ) // == 1
local ent2 = net.ReadEntity( ) // == 2
local ent3 = net.ReadEntity( ) // == 3

Here’s an example of writing multiple booleans with the net library - it’s the same with entities…
https://dl.dropboxusercontent.com/u/26074909/tutoring/networking/networking_booleans.lua

If you’re having an issue where you write the entity, and it’s showing up as null on the other side, either put the net code in a timer.Simple 0; or write the EntIndex in a number field and read the number field on the other end and put it in Entity( EntIndex ) to retrieve the entity.

You saved my ass, thx.