• [HELP] Need help for network library
    3 replies, posted
Hello, as Garry removed datastream, I use the net library. Server side part : [LUA] timer.Simple(1,function () //datastream.StreamToClients( v, "AchatProperty", GAMEMODE.AchatProperty); net.Start( "liferp_realtor_data" ) net.WriteTable( GAMEMODE.AchatProperty ) print(GAMEMODE.AchatProperty) net.Broadcast() end) [/LUA] Client side part : [LUA] net.Receive( "liferp_realtor_data", function( len ) print(net.ReadTable()) end) [/LUA] Normally I would receive the same message, but I receive two different messages : [CODE] table: 0x1fe54dc0 table: 0x271ca580 [/CODE] The first message is the server's message And the second is the client's message Sorry for my english.
The table on the client side is in a different memory spot than the server table. So print shows you different addresses. You should compare the contents of the message, not the pointers.
It work now but my client-side part has a little problem thank you EDIT : The new code : Server side part : [LUA] timer.Simple(1,function () //datastream.StreamToClients( v, "AchatProperty", GAMEMODE.AchatProperty); net.Start( "liferp_realtor_data" ) net.WriteTable( GAMEMODE.AchatProperty ) print(GAMEMODE.AchatProperty[PropertyToggle]) net.Broadcast() end) [/LUA] Client side part : [LUA] net.Receive( "liferp_realtor_data", function( len ) GAMEMODE.AchatProperty = net.ReadTable() print(GAMEMODE.AchatProperty[ID]) end) [/LUA]
What "bug" are you getting?
Sorry, you need to Log In to post a reply to this thread.