Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

creep.id() panics if the creep is still spawning #246

Closed
dcbishop opened this issue Sep 14, 2019 · 2 comments · Fixed by #333
Closed

creep.id() panics if the creep is still spawning #246

dcbishop opened this issue Sep 14, 2019 · 2 comments · Fixed by #333

Comments

@dcbishop
Copy link

Getting the creep via it's name seems to work. I guess the id isn't assigned until it actually spawns.

@dcbishop
Copy link
Author

Also creep.body() stack traces. There's probably a bunch of others too.

1:59:37 PM]
[shard3]
stack trace: Error: unknown resource type undefined
    at __resource_type_str_to_num (main:726:24)
    at main:931:144
    at __cargo_web_snippet_7d41940f01c2e2811bb41f235b8c9f344e6bb606 (main:931:196)
    at _ZN7screeps7objects5impls5creep41_$LT$impl$u20$screeps..objects..Creep$GT$4body17hf892634255804c33E (wasm-function[270]:1150)
    at _ZN20screeps_starter_rust7globals13DeathRegistry10sync_creep17h487e5b25c58c2b37E (wasm-function[662]:162)
    at _ZN20screeps_starter_rust9game_loop17h1748acc8336303a3E (wasm-function[697]:482)
    at _ZN188_$LT$stdweb..webcore..newtype..Newtype$LT$$LP$stdweb..webcore..serialization..FunctionTag$C$$u20$$LP$$RP$$RP$$C$F$GT$$u20$as$u20$stdweb..webcore..serialization..FuncallAdapter$LT$F$GT$$GT$15funcall_adapter17h824a2635e7a34c85E (wasm-function[720]:119)
    at Object.Module.STDWEB_PRIVATE.dyncall (main:458:40)
    at output (main:157:39)
    at Object.module.exports.loop (main:934:108)
[1:59:37 PM]
[shard3]
resetting VM next tick. 

@daboross
Copy link
Collaborator

Second error seems to be #245! Should be fixed soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants