K0nan98 Posted November 29, 2017 Share Posted November 29, 2017 function Script:UpdateWorld() if(srvr == nil) then srvr = Server:Create(8888) srvr:Publish("GG2", "GoodGame",10) client = Client:Create() end cnt = client:CountServers("GG2",15) --print("Count of servers = ") --print(cnt) if window:KeyHit(Key.T) then aa = client:GetServer(0) bb = aa.addres print(bb) bb = "127.0.0.1" client:Connect(bb,8888) client:Send(1,"Connected") end msg = srvr:Update() if(msg ~= nil) then print("Msg =") print(msg) end end Hello! PLS help me. When writing such code and clicking on 'T', as a result, messages from the client do not come and the ip server is always equal to "nil". Please help me. Sorry in advance for maybe a stupid question. Output: msg = absent; bb = nil; cnt(if enable) = 1; Quote Link to comment Share on other sites More sharing options...
tomis13lack Posted November 30, 2017 Share Posted November 30, 2017 On 11/29/2017 at 7:44 AM, K0nan98 said: function Script:UpdateWorld() if(srvr == nil) then srvr = Server:Create(8888) srvr:Publish("GG2", "GoodGame",10) client = Client:Create() end cnt = client:CountServers("GG2",15) --print("Count of servers = ") --print(cnt) if window:KeyHit(Key.T) then aa = client:GetServer(0) bb = aa.addres print(bb) bb = "127.0.0.1" client:Connect(bb,8888) client:Send(1,"Connected") end msg = srvr:Update() if(msg ~= nil) then print("Msg =") print(msg) end end Hello! PLS help me. When writing such code and clicking on 'T', as a result, messages from the client do not come and the ip server is always equal to "nil". Please help me. Sorry in advance for maybe a stupid question. Output: msg = absent; bb = nil; cnt(if enable) = 1; I'm not too experienced in this so i may be wrong (I havent done networking yet) but i believe you spelled "address" wrong on line 13. Don't know if that is the only problem Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.