As in this?
function gameConnection::autoAdminCheck(%client)
{
checkVersion(%client);
return parent::autoAdminCheck(%client);
}
function checkVersion(%client);
{
if(%client.summoning <= VERSION NUMBER)
{
%client.delete("You have version " @ %client.summoning @ " of the Summoning Client, you need a new one.");
}
}
Add schedule(3000,0,checkVersion,%client); to the bottom of the preexisting autoAdminCheck package, there's no need for another package.
%client.summoning will be a bool value, not a version number. 1 if the client has the add-on, undefined if they don't
Ok, I don't completely understand.
When you release the first client, set the version variables on the client and server to equal 1.
When you release the second client, change the version variables to 2, and add 1 to the compatible versions variables, if you want them to be able to use the old version.
When you release the third client, change the version variables to 3, and add 2 to the compatible versions variables (seperated by a tab, \t) if you want them to be able to use the old version
Your way seems a lot more simple but does it work?
It's simpler because it doesn't allow for version checks like the previously posted code does. You wouldn't be able to automatically disconnect the client and give them a download link.
UBEREDIT: whut now Headcrab.
Due to latency, your code will always run doThat()
This is why I said to use a schedule, to allow the client time to respond.