Author Topic: Unknown command onClientEnterGame  (Read 809 times)

I'm trying to start a tick when a client spawns, but it doesn't let me spawn and it says "Unknown command onClientEnterGame"

This is the code:

Code: [Select]
package StartTick {

function GameConnection::onClientEnterGame(%this)
{
parent::onClientEnterGame(%this);
StartTick(%this);
}
};
activatePackage(StartTick);
« Last Edit: July 18, 2012, 03:09:40 AM by Electrk »

What is the StartTick function?
Also try return the parent.
« Last Edit: July 18, 2012, 05:36:03 AM by Wordy »

Chances are that you are calling. Oncliententergame(); with an object other than a client.

Chances are that you are calling. Oncliententergame(); with an object other than a client.
..................

reread code plz

electrk, return the parent: return parent::onClientEnterGame(%this);

but be sure to start your tick before they enter.
Code: [Select]
package StartTick {

function GameConnection::onClientEnterGame(%this)
{
StartTick(%this);
return parent::onClientEnterGame(%this);
}
};
activatePackage(StartTick);

electrk, return the parent: return parent::onClientEnterGame(%this);

but be sure to start your tick before they enter.
Code: [Select]
package StartTick {

function GameConnection::onClientEnterGame(%this)
{
StartTick(%this);
return parent::onClientEnterGame(%this);
}
};
activatePackage(StartTick);

This worked, thanks!