1.
function gamemode::admincheck should be
function gameconnection::autoadmincheck2. .isHost is not defined by the game by default. There's several things you need to check to cover all cases of host joining, I don't remember all of them
3. messageClient takes three arguments, add a blank string between the current two you have (
messageClient(%client,'msg'); becomes
messageclient(%client,'','msg');4. autoadmincheck is the function that gives clients admin, you don't know if they're admin (at least by checking .isAdmin or .isSuperAdmin) before that. Fix this by moving the parent call to the very first line of the function
5. In the parent call, the class the method is called on is left out. The value returned by the parent needs to be stored, so it can later be returned. Remember you also need to change admincheck to autoadmincheck to reflect #1. After all these, it becomes
%r = Parent::autoadmincheck(%client); at first line inside the function, and
return %r; as the last line inside the function
6. The closing bracket of the package definition needs a semicolon at the end
7. the last line should be
activatepackage(admincheck);Don't just copy and paste, look at the differences between the two.
If you want him to do this, then don't give him code that he can copy and paste, give him a list of things to fix as I did