Game Development Community

SetConnectArgs

by Amr Bekhit · in Torque Game Engine · 04/06/2007 (2:50 pm) · 3 replies

Hi all!

Just a simple question: I can use setConnectArgs to send information to the server when I connect (like player name), but how do I retrieve that on the server? Which callback?

Thanks

--Amr

#1
04/07/2007 (12:12 pm)
Any info?
#2
04/07/2007 (4:21 pm)
IIRC, it's probably GameConnection::onConnectRequest(), or somewhere similar.

From several years ago, I remember having to manually check the source code to get the params in the proper order, but if you look at GameConnection.cc, or possibly NetInterface.cc, you should find the connection args processing in short order.
#3
04/08/2007 (4:10 am)
Thanks for the tip about checking the source.

In gameConnecton.cc, I traced it to the function GameConnection::onConnectionEstablished, which makes a call to the script callback GameConnection::onConnect and passes all the parameters to it.

--Amr