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.

Newcomers DBPro Corner / Chat Program ..... NOT WORKING

Author
Message
Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 7th Jan 2007 00:41
Erm i cant get this darn thing to work... can anyone help???



Cheers
Bozzy
dark donkey
18
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 7th Jan 2007 11:57
i really have no idea about whats wrong with it, but i have noticed that you havent put set net connection connection type,adress. thats all i can thind.

load file "worlddomination.wrl",1
Vampiric
17
Years of Service
User Offline
Joined: 30th Oct 2006
Location:
Posted: 7th Jan 2007 12:09
probably because he has no gosub main

All bow down to evil
dark donkey
18
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 7th Jan 2007 12:13
Quote: "probably because he has no gosub main"


what would you put in a gosub main, sorry if i sound rude but i also recently made a chat room that dient work and i am curius why it dident, would you like put preform cheklist for net conections then retveer the number that there ip option is and use that.

load file "worlddomination.wrl",1
Vampiric
17
Years of Service
User Offline
Joined: 30th Oct 2006
Location:
Posted: 7th Jan 2007 12:34 Edited at: 7th Jan 2007 12:34
It asks for your name, prints that you've joined and then finishes because there's a main subroutine after it that hasn't been called

All bow down to evil
Roxas
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 7th Jan 2007 13:09
no you dont have to call gosub main or goto main..

You can simply test it like this



But why your chat program isn't working could be on server.. But i dont really have any exprience of dbpro net command's because i usually use Tempset,winsock or multisync..

I have no soul.. I nobody.. I have no heart.. I have felt in the darkness.. Im the darkness.. Whatever..
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 7th Jan 2007 17:02
Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 7th Jan 2007 17:14
Yep, I used that in the first place

Still can't get it to work mind
Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 7th Jan 2007 17:39 Edited at: 7th Jan 2007 17:39
Dya think it could be that i sourced information from hands on, which is p2p and yours, which is client-hosty (isn't it?)

Sorry, should have edited my last one
GMan
18
Years of Service
User Offline
Joined: 16th Sep 2006
Location: TEXAS
Posted: 7th Jan 2007 19:45
Dark Donkey was right in his first post. You should listen to what he said.

Add this to the beginning: (this assumes you want a connection across the internet, if not then you will have to change a few thins, I might be able to help)


Let me know if that works. If not, then you need to change your "if net connection exists()" commands.

The right man in the wrong place can make all the difference in the world.
Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 7th Jan 2007 20:17
erm well i've used: get ip address$() from the expansion thingy

it's still trying to create a new chatroom mind
GMan
18
Years of Service
User Offline
Joined: 16th Sep 2006
Location: TEXAS
Posted: 7th Jan 2007 20:42
So exactly what is the problem. What happens when you run the program?

The right man in the wrong place can make all the difference in the world.
Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 7th Jan 2007 20:45
Everything runs fine, apart from the fact that it somehow cant see if there is already a connection running or not. As in, when i use: if net game exists()... it cant see if there is a net game or not, when i run two programs together they both therefore try to create a new chatroom, instead of one of them trying to join the one i created on the other prgram
Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 7th Jan 2007 20:51
I've added you on msn, so maybe we can talk properly on that
dark donkey
18
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 7th Jan 2007 21:00
heres somthing simple i made that dosent work tho



ant one no why

load file "worlddomination.wrl",1
Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 7th Jan 2007 22:07
Right I've got them conected, now i need the messages worked out, but i can't seem to do it any of the tuts ways
Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 7th Jan 2007 22:18
SORTED now cheers for evrythin
GMan
18
Years of Service
User Offline
Joined: 16th Sep 2006
Location: TEXAS
Posted: 7th Jan 2007 23:30
What did you do to get it to work Bozzy, so that we can help donkey with his program.

Dark Donkey, if you are having the same problem as Bozzy was, where the application always seems to create a game and they don't connect with each other, then MAYBE, it's the "if net game exists()" command. Not sure, I havn't tested it, but I think that command refers to if you are CONNECTED to a net session. Try replacing "if net game exists()" with:

perform checklist for net sessions
if checklist quantity()>0


The right man in the wrong place can make all the difference in the world.
dark donkey
18
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 8th Jan 2007 18:52
Quote: "What did you do to get it to work Bozzy, so that we can help donkey with his program"


lol, no neeed for that, were working on a networked prodject toghether.

load file "worlddomination.wrl",1
Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 8th Jan 2007 18:57
yep, but now it can connect and work fine on my computer, with just the i.p. address being 127.0.0.1, and thats why i was excited and said it worked lol (just me ) but when i try to get other people to try it the rooms don't show up... on the:

set net connection number of tcip,ip adress

what is the i.p. adress:

1. the joiners ip adress
2. the creators ip adress
3. my ip address for all the chat rooms
4. other

can someone explain please

However, all the other features work fine

Cheers
Bozzy
Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 8th Jan 2007 23:44
Sorry, I put this in to get the replies to my email addy
GMan
18
Years of Service
User Offline
Joined: 16th Sep 2006
Location: TEXAS
Posted: 8th Jan 2007 23:56
The reason others can't connect to you is because you used the "loopback" IP address, which is (127.0.0.1).

When you use that IP on absolutely ANY computer, all it does is tells your computer that you are refering to the computer your on.

What you need to do is click "start > RUN : 'command' (enter)". Then type "ipconfig" in the command prompt and it will show you your IP address. Then you AND the person trying to connect to you must enter the SAME IP address.

An IP address is like an ID for ALL the computers on the internet. If you want to connect to someone else, you need to know their computers IP address.

The right man in the wrong place can make all the difference in the world.
Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 9th Jan 2007 00:08
O ye, I changed it from 127.0.0.1 to give it to other people lol

Anyway, so if I want like my computer to act as like the main like like like... *calms down* hub for all the different rooms (i've expanded it) I need to put, in the code, my i.p. address, and then all the other people can create and join rooms from my i.p right???
RalphY
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: 404 (UK)
Posted: 9th Jan 2007 00:38 Edited at: 9th Jan 2007 00:59
for SET NET CONNECTION you should use the ip of the host (the computer running the room you want everyone to connect to).

Make sure you use the correct ip as well. If you are trying to connect across a local network, then the host ip will be along the lines of 192.168.XXX.XXX. If however your trying to connect across the internet and the host computer is connected to a router, ipconfig will likely return the ip the router has assigned to the computer. This is different to the ip that other computers across the internet will see (the ip of your modem), if in doubt just use this site to get your ip if you’re trying to connect across the internet not a LAN.

Here is some code I found from a simple chat program I made ages ago (around 2002/3 I think), can't remember if I made it in DBPro or DBC, but I know it worked at the time so I figure you may find it useful.
Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 9th Jan 2007 18:50 Edited at: 9th Jan 2007 18:55
I've done what everyone's said but it still doesnt work

set ip to the creator and all
GMan
18
Years of Service
User Offline
Joined: 16th Sep 2006
Location: TEXAS
Posted: 11th Jan 2007 23:19 Edited at: 11th Jan 2007 23:19
OK, try this:
http://darkbasicpro.thegamecreators.com/?m=codebase_view&i=5baa38ded052defa0509374570bcaf7a

That's a little "chatroom" tutorial I wrote a while back. Just paste all that into a "new blank project" in DBPro and press F5. Enter a name and an IP address (for this first test you can use '127.0.0.1'). Then once it says "[ name ] HAS JOINED" then maximize the DBPro editor and press F5 again. You will get a warning message just press OK. This will start a second application that will connect with the first. Enter the correct info again. Then you will have 2 windows open that can Chat between each other. Type a message and press enter.

Then try it on different computer. Start the first one, and enter YOUR COMPUTERS ACTUAL IP address. Make sure you wait until you see the "[name]HAS JOINED" message BEFORE you start the program on the other computer. On the other computer make sure you enter the SAME IP you entered on the HOST computer.

If the first method works but not the second, then your problem is you may have a firewall blocking ports.

If that code works, please let me know, and you are free to use it in anyway you like if it helps.

The right man in the wrong place can make all the difference in the world.

Login to post a reply

Server time is: 2024-09-25 15:29:50
Your offset time is: 2024-09-25 15:29:50