Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Code efficiency test #1 (find the flaw).


    Botre

    Recommended Posts

    78c9aabeff7cd78e5486312865514c8a.png

    Why check for null in setter?

    What if I want to set the object to null? :o

     

    I did enjoy this thread a bit, though.

     

    and if you enjoyed thinking of an inefficiency that you see people do, I would rather enjoy seeing something more script related (inefficiencies of onLoop and how to prevent them, caching objects that don't change but you reset every loop anyway). That way new scripters can see them and understand them. ;)

     

    >hint

    you could start a "Spot the inefficiency!" series of threads ;3;3;3;3;3;3;3;3;3;3;3;3;3;3

     

    EDIT:

    could even turn it into a competition :o

    Link to comment
    Share on other sites

    Why check for null in setter?

    What if I want to set the object to null? :o

     

    I did enjoy this thread a bit, though.

     

    and if you enjoyed thinking of an inefficiency that you see people do, I would rather enjoy seeing something more script related (inefficiencies of onLoop and how to prevent them, caching objects that don't change but you reset every loop anyway). That way new scripters can see them and understand them. ;)

     

    >hint

    you could start a "Spot the inefficiency!" series of threads ;3;3;3;3;3;3;3;3;3;3;3;3;3;3

     

    EDIT:

    could even turn it into a competition :o

     

    The point was that you shouldn't check twice.

    But agreed that not being able to set an object to null is a flaw in itself as its one of the only ways to optimize memory.

    I might start another script consulting thread though.

    Who knows :D

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.