• .net not triggering after reconnect?
    2 replies, posted
Hello, I'm having a issue with the .net library probably. I'm having all vars saved on MySQL, then I recieve them and send them to the client like this: [lua] target = target or player.GetAll() net.Start("ptp_DataVars_SQL") net.WriteFloat(ply:UserID()) net.WriteTable(ply.ptpData) net.Send(target) [/lua] On the client side it's received like this and put in a table. [lua] local function doRetrieve_SQL() print("receive SQL DATA") local ply = Player(net.ReadFloat()) ply.ptpData = net.ReadTable() end net.Receive("ptp_DataVars_SQL", doRetrieve_SQL) [/lua] This code works just fine. BUT if I reconnect, the client side net is never called. I've tried to debug it with prints and such. The server side though runs like it should...? If I restart server, it works again. Seems to be a issue when reconnecting... Any ideas what could be causing this? The table is not nil when I reconnect, so the data and everything is as it should.
If you are storing target, the player likely doesn't exist in the list anymore - do other players still get the message if you send it again?
That's true, fixed the storing, and it fixed the issue :) Thanks.
Sorry, you need to Log In to post a reply to this thread.