Jump to content

Recommended Posts

Posted
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! I bought a professional edition and for 3 days I've been trying to understand how it works. 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;

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...