Game Development Community

client.delete() problem

by Stuart Campbell · in Torque Game Engine · 08/26/2002 (5:54 am) · 3 replies

Heres an interesting one for you all.

I have two servers, i want a player to be able to "jump" between the two. To do this i have set up a trigger object that when the client enters it deletes the clients connection.

With this code the server crahes.

Trigger::onEnterTrigger(%this,%trigger,%obj)
{

%obj.client.delete();

}


With this code the server crahes but the following error appears in the servers console "Call to delete in onEnterTrigger uses result of void function call".

Trigger::onEnterTrigger(%this,%trigger,%obj)
{

schedule(100,%obj.client.delete());

}

I even got desperate and tried this =P

Trigger::onEnterTrigger(%this,%trigger,%obj)
{
%temp = %obj.client;
schedule(100,%temp.delete());

}

I've tried a clientCmd that calls the disconnect() function under instruction from the server. This cause the client to crash.

To make things even more interesting if i type .delete(); in the servers console the clients connection is killed w/o error.

Can anyone shed any light on this?...

Thanks in advance
-Stuart

#1
08/26/2002 (7:14 am)
FIXED..

-THREAD CLOSED- :)

-Stuart
#2
08/26/2002 (7:28 am)
And the solution is.......?
#3
08/26/2002 (7:40 am)
Sorry i forgot to post the solution.

I wont take the credit for it Bruce Wallace is the man of the moment..

See the relevant post here
www.garagegames.com/index.php?sec=mg&mod=forums&page=result.thread&qt=4540