Navigation

    forum

    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    1. Home
    2. Frhay
    3. Topics
    • Flag Profile
    • block_user
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups
    • Blog

    Topics created by Frhay

    • [Solved] Property pos empty on creep in remote room
      Help • • Frhay

      6
      6
      Posts
      9501
      Views

      The actual problem was that I use a list of "sources" dependent to the creep role, and long story short, when the storage was missing (like in a new room) the correspondant "source" element wasn't null, but an array with null as element, so the find function was trying to find the pos property of that null element.
    • CPU Usage with require
      Help • • Frhay

      6
      6
      Posts
      7945
      Views

      Ouch, we wrote again at the same time! Well I've just put a Game.cpu.getUsed() at the start of the main file, and one after the last require instruction. All the required file are prototype extensions and module exportations, there's not further code executed before the main cycle (unless Skynet took over and I'm not aware!).
    • [Solved] Correct implementation of function library
      Help • • Frhay

      7
      7
      Posts
      10726
      Views

      I'm on holiday, so I forgot to login here too to say thanks for other answers! Thanks for the hints about how to include my files with prototype extensions! I converted most of my common functions into new functions extending Creep prototype and I must say I'm quite satisfied by the result, except for the CPU weight on module loading. But I'll open a new thread for that, since it's a separate topic. Many thanks again to all of you who helped my out.