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 / getting a net message :(

Author
Message
pathfinder
21
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 21st Oct 2002 20:13
I have got a client server working. Well I can get the client to log onto the game but messaging the server seems to fail. Only one thing Iam running both on a single machine. Anyone else had this running on one machine?
Super Teo
21
Years of Service
User Offline
Joined: 18th Sep 2002
Location: Sweden
Posted: 21st Oct 2002 20:46
Should be no problem if you run on one machine.
You can do something like this:
pathfinder
21
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 21st Oct 2002 21:39
Server sees my player when this runs

perform checklist for net players

for c=1 to checklist quantity()
print c;". ";checklist string$(c);" ID:";checklist value a(c);" UNIQUE:";checklist value b(c);" ";
if checklist value c(c)=1 then print "(me) ";
if checklist value d(c)=1 then print "(host) ";
print
next c

Server is ID 1
player is ID 2

client does

send net message string 1,"hi from me"

server has this in it

if net message exists()=1 then print "RECEIVING..."
print net message string()
get net message..."

any tips , apart from give up

pathfinder
21
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 21st Oct 2002 22:00
tried your code teo, nothin , but the player is logged on the game.

Super Teo
21
Years of Service
User Offline
Joined: 18th Sep 2002
Location: Sweden
Posted: 21st Oct 2002 22:08
Humm..
Download this and see if it helps.. its alittle tutorial I made
http://www.db-pro.co.uk/progtuts/int1.htm
pathfinder
21
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 22nd Oct 2002 00:28
hmmm looking at it now mate. Maybe ill try memblock send better way to send info anyway?

pathfinder
21
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 22nd Oct 2002 01:02
cool found it, my booboo, had the silly sync above my print command *looks very stupid*


thanks alot teo that helped me loads

Super Teo
21
Years of Service
User Offline
Joined: 18th Sep 2002
Location: Sweden
Posted: 22nd Oct 2002 01:04
Glad I could help

Login to post a reply

Server time is: 2024-04-23 22:02:44
Your offset time is: 2024-04-23 22:02:44