Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Net Messaging Problems

Author
Message
HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 21st Jul 2003 09:09
Okay, I've run into a bit of a problem. I'm trying to make sort of a chat program, but I'm using the input command. The problems lies with that: in order for the user to receive the next message, they have to type something else. Does anyone have any suggestions for ways around this? Thanks a bunch.
SW Games - www.freewebs.com/swgames

Yeah, I know, I only have one game. Yeah, I know it sucks. But I made it! Me!
shwuckie
23
Years of Service
User Offline
Joined: 9th May 2003
Location: Australia
Posted: 21st Jul 2003 18:02 Edited at: 21st Jul 2003 18:06
without any code to examine its a bit hard to help you, but i will supply a link to my NetChat Lobby example program.

http://www.geocities.com/shwuckie/NetLobby.jpg

Right Click on that link and choose Save Target As and rename the file to NetLobby.ZIP (geocities doesnt allow Zip files so i called it a Jpg instead LOL) oh you may have to delete the project file (.DBPRO) and create a new project file for it. you will have to do this if ya extract it to anywhere else besides :
"C:\Program Files\Dark Basic Software\Dark Basic Professional\Projects\NetLobby"

its a client server based system, it is limited to 2 users in its current form (ie the host and one remote user) but it should be easy enough to follow to change to allow for more than 1 remote user, in fact it used to support 16 users once upon a time, but i modified it for another program i am writing which is a two player game. so im afraid ya will have to change it to the old method yaself, until i get around to doing it


hope it helps!

optic blast! megablast! have a blast!!
shwuckie
23
Years of Service
User Offline
Joined: 9th May 2003
Location: Australia
Posted: 21st Jul 2003 20:17
oops i forgot to mention, dont use the input command! in that code there is a routine called CheckInput



which is what i wrote so i wouldnt rely on the input command it works by doing a gosub to the routine each loop then checking if the enter key ispressed after it returns if it was then it will send a message

eg:



err yeah hope that helps too!

optic blast! megablast! have a blast!!
HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 21st Jul 2003 20:44
Wow that looks complicated...

SW Games - www.freewebs.com/swgames

Yeah, I know, I only have one game. Yeah, I know it sucks. But I made it! Me!
shwuckie
23
Years of Service
User Offline
Joined: 9th May 2003
Location: Australia
Posted: 22nd Jul 2003 07:18
ummmm what looks complicated the whole program or just the replacement for the input command?? i suppose it does look a bit complicated at first but when ya break it down its not too hard to follow... i think lol

optic blast! megablast! have a blast!!
HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 23rd Jul 2003 00:48
you think?!??! gawd people these days...




SW Games - www.freewebs.com/swgames

Yeah, I know, I only have one game. Yeah, I know it sucks. But I made it! Me!
ICERGB
23
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 26th Jul 2003 13:38
That little input routine is just what I needed.

Thank you Schwukie!
shwuckie
23
Years of Service
User Offline
Joined: 9th May 2003
Location: Australia
Posted: 28th Jul 2003 06:36
no problemo dude!

optic blast! megablast! have a blast!!

Login to post a reply

Server time is: 2026-07-23 02:36:27
Your offset time is: 2026-07-23 02:36:27