#989 closed defect (invalid)
Entity with soldier class but no position
Reported by: | Jonathan Waller | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | |
Component: | UI & Simulation | Keywords: | |
Cc: | Patch: |
Description
When Pureon was testing against qBot he hit the error TypeError: ent.position() is undefined in the block of code http://pastebin.com/GFzwHLCG
The full contents of interestinglog are attached.
It was about 10 minutes into a game on Oasis IV with qBot as hele. JuBot was also playing.
Since the line with the error is only run when the entity has CitizenSoldier or Super class I think it must be an engine bug for position to not be defined.
The version of qBot at the time was: https://github.com/quantumstate/qBot/commit/77a95a4160166cf23962d62001324f5b8c45efd7
Attachments (1)
Change History (4)
by , 13 years ago
Attachment: | errors.txt added |
---|
comment:1 by , 13 years ago
Position doesn't have to be defined, in fact sometimes it isn't (if the entity is off-world, such as when garrisoned or not yet spawned). You should always check that an entity's position is defined before using it :)
comment:2 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Ok, thanks I hadn't considered garrisoning, not yet spawned entities seem a little odd but it is no problem, I have put a check into my code.
comment:3 by , 12 years ago
Milestone: | Backlog |
---|
interestinglog contents