The Daily Click ::. Forums ::. Klik Coding Help ::. Stupid lacewing question.
 

Post Reply  Post Oekaki 
 

Posted By Message

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
20th April, 2010 at 22:42:37 -

Using lacewing atm and trying to create a simple online chat.

I am using 2 different clients and connect successfully to Klikfarms server and then a channel on each simultaneously under different Names.

When I sent a text message to the server and check for it to be received on the other end, it never gets received.

Heres how the code goes after the connection part.



Edit box has Text + Upon Pressing Enter
- Send Text from edit box to server on subchannel 0
- Empty Edit Box

On Text Server Message on Subchannel 0 sent
- Add line Received$(Lacewing) to list object

This results in nothing happening.

I've even tried changing animations of an object when a message is received, adding random text, edit boxes, etc. I've also followed one of the original guides for OINC, a members guide here, and another members examples and this snippet of code looks pretty much the same in both (minus the fact that some use peer or channel instead of server)

Any ideas?



Edited by GamesterXIII

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
21st April, 2010 at 00:23:14 -

Have you tried changing that one difference? Using peer or channel?

Something is itching at the back of my head saying server messages are dealt with differently, but I'm sure I'm just crazy.

Would it be possible to share the mfa?

 

  		
  		

Sumo148

Super amazing fantastic user

Registered
  26/01/2009
Points
  530

360 OwnerThe Cake is a LieVIP MemberPokemon Ball!I am an April FoolI donated an open source projectSanta Hat
21st April, 2010 at 02:33:19 -

Try using send to CHANNEL and not server. Then your method should work.

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
21st April, 2010 at 09:05:03 -

What you're doing is sending a message to the server. If you're using a public server that means you're sending a message directly to their box and if you're using a local server (the CMD-styled window) then you're sending the message to that application. The server must be coded to reply to your messages, so when it receives your message, by default, it does nothing. Your On Text Server Message condition works the same way, expecting a message from the server, which it will never send.

You need to change those "Servers" to "Channel" which well send a message to all of the other players who are on the channel, as Sumo148 described.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
21st April, 2010 at 20:35:09 -

I'm using klikfarms servers.

I have tried all three methods and none have worked. I will try one more time and post the MFA if I can't figure it out. Thanks

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
21st April, 2010 at 21:51:42 -


Originally Posted by Assault Andy
What you're doing is sending a message to the server. If you're using a public server that means you're sending a message directly to their box and if you're using a local server (the CMD-styled window) then you're sending the message to that application. The server must be coded to reply to your messages, so when it receives your message, by default, it does nothing. Your On Text Server Message condition works the same way, expecting a message from the server, which it will never send.



I knew I wasn't crazy!

 

  		
  		

Sumo148

Super amazing fantastic user

Registered
  26/01/2009
Points
  530

360 OwnerThe Cake is a LieVIP MemberPokemon Ball!I am an April FoolI donated an open source projectSanta Hat
21st April, 2010 at 22:13:38 -


Originally Posted by GamesterXIII
I'm using klikfarms servers.

I have tried all three methods and none have worked. I will try one more time and post the MFA if I can't figure it out. Thanks



Then are you sure your connecting to the server correctly and using a valid username? It should go somewhat along the lines of...

1. Start of frame > Connect to server.klikfarm.com on port 6121
2. On Connect > Set username to "anything"
3. On Username Set > Join channel "anything"
4. On channel join > Send text "blah" to channel on subchannel 0
5. On channel text message on subchannel 0 > do whatever you want

Edited by Sumo148

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
22nd April, 2010 at 09:22:52 -

Take a look at the example that are provided in the Lacewing Forums. They show basic examples of how to get a game up and running.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
22nd April, 2010 at 15:24:49 -

I have read it and followed it =/. Maybe I'm missing something small. I haven't exactly had time to check on it again so I'll post back when I do.

@sumo
thats pretty much how I did it. I haven't had time to double check it yet, sorry.

 
n/a

Sumo148

Super amazing fantastic user

Registered
  26/01/2009
Points
  530

360 OwnerThe Cake is a LieVIP MemberPokemon Ball!I am an April FoolI donated an open source projectSanta Hat
22nd April, 2010 at 17:49:19 -

maybe try a different server? "aquadasoft.com on port 6121" is better than klikfarm. It's pretty much twice as fast too.

 
n/a

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
27th April, 2010 at 03:40:31 -

Got it working with the channel suggestion.

I could have sworn I tried that already . . .oh well.

Thanks guys

 
n/a
   

Post Reply



 



Advertisement

Worth A Click