![]() Aug 26 2010, 11:41 am
In response to Garthor
|
|
Well, I can't seem to find any others..
|
You're either missing one or you are mistaken about them calling ..()
Though, I'll say that having a proc overridden multiple times for the same type is rather poor design. |
I'm sure that I'm not missing any client/New().
Well anyway, I moved them all together now under the client/New() we had from the ban code file. And what do you exactly mean by that I am having a proc overridden multiple times for the same type? Thanks, Raimo. Ps: Is there any fault in this client/New()? client |
Raimo wrote:
return Take a moment and consider what these two lines actually do. Hint: return is meant to 'stop execution of the current proc (...)' |
Anything after a return statement will not be executed. In all honesty, it really should produce a compiler warning to the effect of "statement unreachable".
|
Made it like this now, is this correct:
client |
Garthor, the messages that were outputted to the world like you told me to do, they pop up now. So I've tested the ban system out again, the player gets added to the list (as we can see on the messages you made) but he can still login and play.
|
orry for the late reply but, if there was an issue with the client/New() where ti was skipping the ban check then setting it to mob login could be a workaround, if it worked with mob login then he'd know there was an issue with the client/New() version that he had.
It's like if your internet goes out, if your modem seems to be working right them you'd check your router before cracking open the modem and fiddling with it, so to speak. |
If you must have the returns in there then you can, but you should have ..() appear before it. return basically cuts off a procedure, modifying client/New() overrides the built-in proc, ..() calls the built-in proc.
So if you have a return before the built in proc is called with ..() then all New() is going to do is check for bans. It wont do any of it's normal functions such as setting client variables to their defined values or even connecting the player in the first place. best thing to do if you're going to override a proc and use a return along the way is to make the very first line of the override: ..() |