Alternate Chapter 6
by Simon Engler · in Torque Game Engine · 10/02/2005 (8:47 pm) · 4 replies
I downloaded the alternate chapter 6 pdf file. I took the Chapter 5 code and modified it exactly according to the instructions.
However, I get a bug with the 'queryMasterServer' function. The output says there is the wrong number of arguments when I hit the Query Server button. The function in the book appears to differ from the function form in the engine/net/serverQuery.cc file:
extern void queryMasterServer(U8 flags, const char* gameType, const char* missionType,
U8 minPlayers, U8 maxPlayers, U8 maxBots, U32 regionMask, U32 maxPing, U16 minCPU,
U8 filterFlags, U8 buddyCount, U32* buddyList );
In the file masterscreen.cs I entered the function call in 'Query()' as:
QueryMasterServer(0,$Client::GameTypeQuery,$Client::MissionTypeQuery,1,100,1,2,1,100,1,1,"");
Which is exactly what the TGE expects, however, I still get the same error.
Any ideas what is going wrong?
However, I get a bug with the 'queryMasterServer' function. The output says there is the wrong number of arguments when I hit the Query Server button. The function in the book appears to differ from the function form in the engine/net/serverQuery.cc file:
extern void queryMasterServer(U8 flags, const char* gameType, const char* missionType,
U8 minPlayers, U8 maxPlayers, U8 maxBots, U32 regionMask, U32 maxPing, U16 minCPU,
U8 filterFlags, U8 buddyCount, U32* buddyList );
In the file masterscreen.cs I entered the function call in 'Query()' as:
QueryMasterServer(0,$Client::GameTypeQuery,$Client::MissionTypeQuery,1,100,1,2,1,100,1,1,"");
Which is exactly what the TGE expects, however, I still get the same error.
Any ideas what is going wrong?
#2
Anyone get a masterserver functioning so that they could get online games using this book?
10/26/2005 (1:11 pm)
Bump. Anyone get a masterserver functioning so that they could get online games using this book?
#3
As for the problem with the 'queryMasterServer' function, I have no idea what's wrong with yours, but mine works and mine looks like this:
function MasterScreen::QueryLan(%this)
{
QueryMasterServer(
0,
$Client::GameTypeQuery,
$Client::MissionTypeQuery,
1, // min Players
100, // max Players
1, // max Bots
2, // Region Mask
0, // max Ping
100, // min CPU
0, // Filter Flags
0,0);
}
12/18/2005 (4:08 pm)
Yeah, I got pretty far with the masterserver, i got it all working except that when I press 'connect to server' all I get is a box that sais player name, stuff like 'players, ping, etc' and a big white empty box. Im working on fixing it, if I get it working I'll tell you.As for the problem with the 'queryMasterServer' function, I have no idea what's wrong with yours, but mine works and mine looks like this:
function MasterScreen::QueryLan(%this)
{
QueryMasterServer(
0,
$Client::GameTypeQuery,
$Client::MissionTypeQuery,
1, // min Players
100, // max Players
1, // max Bots
2, // Region Mask
0, // max Ping
100, // min CPU
0, // Filter Flags
0,0);
}
#4
// WRONG (this version is _everywhere_ )
// QueryMasterServer(0,$Client::GameTypeQuery,$Client::MissionTypeQuery,0,100,0,2,0,100,0,0,0);
// CORRECT
QueryMasterServer(0,$Client::GameTypeQuery,$Client::MissionTypeQuery,0,100,0,2,0,100,0);
The full thread is here:
http://www.garagegames.com/mg/forums/result.thread.php?qt=19658
12/25/2005 (8:07 pm)
If you are tyring to Query the GG Master Server (or your own running in Perl), then try removing the last 2 zeros in the QueryMasterServer statement -- it looks like the latest version that the GG folks are running doesn't use them:// WRONG (this version is _everywhere_ )
// QueryMasterServer(0,$Client::GameTypeQuery,$Client::MissionTypeQuery,0,100,0,2,0,100,0,0,0);
// CORRECT
QueryMasterServer(0,$Client::GameTypeQuery,$Client::MissionTypeQuery,0,100,0,2,0,100,0);
The full thread is here:
http://www.garagegames.com/mg/forums/result.thread.php?qt=19658
Torque Owner Simon Engler
Has anyone every gotten the Alternate Chapter 6 Master Server to work at all?