Code archives/Networking/chatroom

This code has been declared by its author to be Public Domain code.

Download source code

chatroom by Heliotrope2009
can someone please test this for me
AppTitle "deh-chatroom"
Graphics 1000,700,16,2
Graphics 100,70,16,2
StartNetGame ()
Graphics 1000,700,16,2
n$ = Input$ ("name : ")
nu = Input ("1-10")
CreateNetPlayer (n$)
Repeat
	If RecvNetMsg () And NetMsgType < 0 And NetMsgType > 10 Then Print NetMsgData$ () + NetMsgFrom()
	If KeyHit (199) Then send = True And se$ = Input$ ("message :  ")
	If send = True Then SendNetMsg nu,se$,n$,0,0 And send = False
Until KeyHit (1)
DeleteNetPlayer n$
End

Comments

Heliotrope2010
hello,anyone


Oiduts Studios2010
Hello, I understand that you are new here but the code archives are more for "finished" projects. You would probably get feedback from the community if you posted this on the Blitz3d forums. I do not have much experience with TCP and network games in Blitz, sorry.

But you should check out this...
http://www.blitzbasic.com/codearcs/codearcs.php?code=2263


Heliotrope2010
thanks


Heliotrope2010
hello,anyone


Guy Fawkes2010
Mate ur better off using the link blitz monkey gave u. I already coded it to know how to use slash commands (/mytext)!


Heliotrope2010
I have tried loads of things but cann't get it to work.

latest one :


Graphics 1000,700,16,2
n$ = Input$ ("name : ")
nu = Input ("1-10")
CreateNetPlayer (n$)
Repeat
If RecvNetMsg () And NetMsgType < 0 And NetMsgType > 10 Then Print NetMsgData$ () + NetMsgFrom()
If KeyHit (199) Then send = True And se$ = Input$ ("message : ")
If send = True Then SendNetMsg nu,se$,n$,0,0 And send = False
Until KeyHit (1)
DeleteNetPlayer n$
End


Code Archives Forum