Game Development Community

function connect not found in HEAD version ...

by Michael Schaumburg · in Torque Game Engine · 11/23/2002 (2:36 pm) · 17 replies

Today I updated to the latest HEAD version. I'm suprised to get an error when trying from the console to connect my two pc's in a LAN. With the version 1.1.2 the command was connect("x.x.x.x"); now I get an error which says "function connect not found". Anybody who knows how to connect now ?? Why the command changed ??
Sorry for the connecting problems again but it's not my mistake I think ....

Michael

#1
11/23/2002 (3:14 pm)
For months now, it has been done with a connection object thus:

%loginName = $pref::Player::Name ;

   %conn = new GameConnection(ServerConnection);   
   %conn.setConnectArgs(%loginName);
   %conn.setJoinPassword($Client::Version);
   %conn.connect(%server_ip);


  ( or )  

   %conn.connectLocal();
#2
11/23/2002 (3:46 pm)
so much for staying compatible with mods...
function connect(); needs to be reimplemented!
#3
11/23/2002 (9:27 pm)
So with the new connection object it is no longer possible to connect from the console, right ? Or how can I do that ...??
#4
11/24/2002 (8:13 am)
this happened to me acouple months a go, heres what idid to corect it in my mod

· Changed script in Pwrweapons\client\ui\startMissionGui.gui. 9-22-2

(Otherwise older mod versions won't work)

function SM_StartMission()

{

%id = SM_missionList.getSelectedId();

%mission = getField(SM_missionList.getRowTextById(%id), 1);



if ($pref::HostMultiPlayer)

%serverType = "MultiPlayer";

else

%serverType = "SinglePlayer";



createServer(%serverType, %mission);

localConnect($pref::Player::Name);

%conn = new GameConnection(ServerConnection);

RootGroup.add(ServerConnection);

%conn.setConnectArgs($pref::Player::Name);

%conn.setJoinPassword($Client::Password);

%conn.connectLocal();

}
#5
11/24/2002 (9:17 am)
Ace, that's the solution how to connect from the console ?? I can see that you added "localConnect($pref::Player::Name);" for older mods but how do I connect from the console ?? Now I'm completely confused, it was so easy the old connect function ....
#6
11/24/2002 (12:36 pm)
Yes, this was indeed changed by mark when he was doing some network changes. You can't connect from the console easily. Why do you want to connect from the console though?
#7
11/25/2002 (12:08 am)
Think about you will make a local lan party, and one pc will start a multiplayer game where the others will join. I must build now a gui where the clients can put the ip address to join. I have tried to use the function query masters, but this doesn't find the local pc as a master server to join. Any other ideas ??
#8
11/25/2002 (4:55 am)
I fixed the joinserverdialog and the serverquery.cc and .h files yesterday to allow for a new button, Query LAN Servers, to be placed in the gui, that will ONLY query lan servers, unline the previous query master that queried both, but if you weren't online the lan servers where never queried and the gui got stuck with the querying servers msg.
I'll post this as a resource soon.
#9
11/25/2002 (6:48 am)
altho my 4 computers are online as soon as they boot up, than sounds like a cool fix (i never noticed the lan thing was broken)
#10
11/25/2002 (8:19 am)
Can't wait to get your resource, but I can't understand that this wasn't a discussion before,hmm ??
LAN parties are popular I think and to make a game without LAN function isn't interesting.....

Michael
#11
11/25/2002 (8:48 am)
It was discussed many times... I made some posts about it too... just never no one fixed it.
#12
11/25/2002 (9:18 am)
Ok, go ahead and try it out. Hope I didn't forgot anything this time :)
This is my tutorial number eight already ;)

www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3561
#13
11/26/2002 (7:11 am)
I did exactly what you have written but I can't connect to my LAN server as I get an error in the console :

fps/client/ui/joinServerGui.gui (253): Unable to find object: 'JS_joinServer' attempting to call function 'setActive'

Any ideas ???


Michael
#14
11/26/2002 (11:21 am)
I was running through all my code but I can't find anything which might be wrong. So is it possible that we are working with another HEAD version ?? Also where is this object defined : Unable to find object: 'JS_joinServer'
And where is this function : call function 'setActive'
The first time when I open the join dialog gui, I get this error..

Any suggestions .....
#15
11/26/2002 (11:53 am)
It's the button that you click to join the server and it's on every torque version, not only head:
new GuiButtonCtrl(JS_joinServer) {
         profile = "GuiButtonProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "318 272";
         extent = "127 23";
         minExtent = "8 8";
         visible = "1";
         command = "Canvas.getContent().join();";
         helpTag = "0";
         text = "Join Server";
            active = "0";
      };
#16
11/26/2002 (12:18 pm)
Sorry, my fault, I'm sitting to long, so I didn't saw that this button definition was going by pasting the new code. Again, sorry....
When I start on one pc a multiplayer game (just mark the checkbox), I can't see this LAN server by pushing the query LAN button. Must I start a dedicated server which can be found from the other ??

Michael