More 39.dll questions!

Posted by HomerTheDragoon on Dec. 5, 2006, 3:23 p.m.

<b>39.dll</b>

Well ive made lots of progress with my current project and id like to thanks SJF alot for helping me with just about everyquestion ive had.

Well ive got a few more now :(, In my waiting room i have it so you can see the players that joined in slot like areas(sorta like wc3 custom games). Anyways i cant figure out how to kick the player(aka disconnect them). This seems like such a simple question :(.

WEll acutally now that i think about it, thats the only question :P. Ill probably edit it and add more since i will get more questions most likely.

<b>Progress on BMG:</b> None atm, working on the online game setting up part. Once i get that ill merge it into BMG and start making coversions from the offline to the online ones. You will also beable to put computerplayers in on multiplayer. Just incase you dont have enough people :).

<b>General News:</b>

Me and some other kid are mostlikely skipping out of first hour and mayb more to get a wii wensday/thursday. And ill get an excused absents :). Pretty funny story but i dont feel like typing it out.

Not to much other stuff happening.

Comments

Toon-Master 18 years ago

I think he ment closesocket(socket); but when you do disconnect the player try sending a message to the other player and then disconnect.

Like:

clearbuffer();
writebyte(disconnect_msg);
sendmessage(tcpsocket);
sleep(100); //Incase the message didn't make it
closesocket(socket);

In my 39dll tutorial 2, I made a kick player out example if I remember correctly.

- Toon-Master

HomerTheDragoon 18 years ago

ive got it working now, except i closed the socket from the client side. I sent a message to close it from client side dunno if this is how im suppose to do it :P

Toon-Master 18 years ago

Well when that player receives the disconnect, they just close the socket when they got the message. If you have like more then 2 players working (1 server one client), you will probably have to make the server send the disconnect message to the other players so that they know the player does not exist anymore.

It's just another way incase receivemessage(socket,[bytes]); never returned 0. Also you should check if it does not also equal -10035 or over over 0 as that means something is wrong with the socket (probably disconnect too). Because -10035 means it would of block (tcpconnect or whatever have argument2 as 0 and would of froze) or just simply say it has no messages to receive but the socket is still connected.

Hope that helps.

- Toon-Master

HomerTheDragoon 18 years ago

i got it working right now… I still need to work out some minor things. Its pretty cool :).

HomerTheDragoon 18 years ago

Btw thanks.