[Question] Handlers

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
brutus
Posts: 325
Joined: Sat Nov 10, 2007 4:18 pm
Location: Bulgaria

[Question] Handlers

Post by brutus »

Hello.
can someone answer me why all command handlers are boolean methods? they doesnt return anything anywhere
Lee
Posts: 102
Joined: Wed Sep 02, 2009 11:10 pm

Re: [Question] Handlers

Post by Lee »

brutus wrote:Hello.
can someone answer me why all command handlers are boolean methods? they doesnt return anything anywhere
yes they do...
a func requiers a return false or return true and this cant be done on void.
User avatar
brutus
Posts: 325
Joined: Sat Nov 10, 2007 4:18 pm
Location: Bulgaria

Re: [Question] Handlers

Post by brutus »

Lee wrote:
brutus wrote:Hello.
can someone answer me why all command handlers are boolean methods? they doesnt return anything anywhere
yes they do...
a func requiers a return false or return true and this cant be done on void.
can u show me an example? which function uses thes booleans

boolean methods are used to return false/true somewhere but in this case there isnt any other method that use them as check i didnt find any
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: [Question] Handlers

Post by janiii »

probably it was used with a return value some time before, so that the methods have now their boolean return values, but they are nowhere used. that is not an error, is done normally. (e.g. the boolean return value of executeUpdate of an sql query is mostly also not used). it is just about making a possibility for checking if the admin command went wrong or good and to check it somewhere else - can be done, but dont have to be done.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
brutus
Posts: 325
Joined: Sat Nov 10, 2007 4:18 pm
Location: Bulgaria

Re: [Question] Handlers

Post by brutus »

yep its what i thought that they were used before but right now they arent.. i am pretty sure that changing them to void methods wont increase/decrease the performance but it will be just more clean :|
Post Reply