Greetings,
Even without a generated error, functions in screeps will return an ERR_
code or an OK
when run, this assists in the debugging process. So your creep.moveByPath(Memory.sourcePath1)
should be returning a code other than OK.
https://docs.screeps.com/api/#Creep.moveByPath has a table showing all the codes that can return, and what they mean.
My guess is that you are calling Memory.sourcePath1
instead of creep.memory.sp1
* because from the first code, it looks like you set the paths to the creep's memory, not just the Memory object itself (unless you've done this somewhere not displayed in your post)
As a side note, if the creep does not start on/adj to a step on your path (depending on how your path was generated) then you will likely get ERR_NOT_FOUND
as they moveByPath()
fails to find where it is on the path.
Would recommend checking out Screep's Discord server, its a bit more dynamic and faster to get assistance, normally some one around can help in #world-help.
If you don't like discord, would recommend checking out:
https://docs.screeps.com/debugging.html
https://wiki.screepspl.us/index.php/Basic_debugging
https://wiki.screepspl.us/index.php/A_brief_guide_to_reading_the_Screeps:World_API_Documentation