[solved] Room.lookForAt() overload error



  • Documentation sais, that there're 2 types of Room.lookForAt() method, but one of them doesn't work:
    * Room.lookForAt(type, target) - works well
    * Room.lookForAt(type, x, y) - throws error "TypeError: Cannot read property 'undefined' of undefined"

    Is there any other, more robust problems reporting channel?
    I hope to see a github repo soon to submit issues there 🙂


  • Culture

    Can you make sure the x and y coordinates are integers? You can do this by adding Number () arround them. The api works well here for xy coordinates



  • Ah, never mind, I just forgot to make parseInt(x) before passing value to this function 🙂



  • Yep, thank you Dissi, values were strings 🙂


  • Culture

    Awsome! Glad I could help. Ran into the same issue a while ago.

    Good luck with screeping!