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 / Can't start a server

Author
Message
The Zoq2
16
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 8th Mar 2011 20:04 Edited at: 8th Mar 2011 20:07
Hi, im trying to create a server but it dosn't work.

Im following this tutorial

http://www.youtube.com/watch?v=QVDh49fw8TQ&feature=relmfu

It get's to the checklist quantity but then it fails

Here is the code i made



Srry about my english im from sweeden
The Zoq2
16
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 9th Mar 2011 16:24
I think i know what the problem is, When the program checks for "Internet TCP/IP Connection For DirectPlay" it can't find it since im using a swedish windows and the string is diffirent then. Unfortunley i have no way of testing it on an english windows and i have no idea what it shuld say on my version...

Srry about my english im from sweeden
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 9th Mar 2011 21:28
I can't give you a definitive fix, but hopefully this will help.

If you have my plug-ins, and your internet connection string contains the letters 'TCP/IP', then changing the line to something like this will work for you:


You can check if that's the case, by putting this line into the loop before that check:


The Zoq2
16
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 9th Mar 2011 21:33
Thanks but I found an other way, I printed all avalible options and picked the one that was called the correct thing. But now i can't seem to get the computers to communicate.

Here is my two codes for sending an reciving messages

Sever(reciving)

Client(sending)


Srry about my english im from sweeden
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 9th Mar 2011 22:17
Ok, but if you are using the swedish equivalent to the english string you used before, then you'll have the exact same problem when your program runs on a non-swedish version of windows.

On to your next problem - you are missing the fact that every SEND NET XXXX command you execute is an entire message, so if you send two integers, then your server needs to run GET NET MESSAGE twice, once for each integer it gets. Even then, you may miss a message, or receive them in the wrong order.

IMO, there are only two commands you should use to send messages - SEND MESSAGE STRING and SEND MESSAGE MEMBLOCK - all the others are useless.

Here's an example of sending mouse movement from one DBPro program to another:


This only uses memblocks, but you could also use strings for the same purpose, or instead use strings for messaging between players and keep memblocks for game data.

The Zoq2
16
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 9th Mar 2011 22:44
I have tried to send a single message to and it still didn't work...

And about the language thing, i know that will be a problem, but right now im only trying to make a small game to play with my friends.

Srry about my english im from sweeden
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 9th Mar 2011 23:18
Frankly, I don't see how I can help you further. 'Still doesn't work' doesn't help me to help you.

Try the program I provided and run two copies of it on the same machine. Study it to see how it works, then use what you learn to get your program working.

The Zoq2
16
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 10th Mar 2011 00:12
Ok, i will test it tomorrow.

What i meant was that when I only sent one message it didn't work.

Srry about my english im from sweeden

Login to post a reply

Server time is: 2026-07-15 00:02:54
Your offset time is: 2026-07-15 00:02:54