kcyeu / game-golem

Automatically exported from code.google.com/p/game-golem
0 stars 1 forks source link

Guild battle gives error #279

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
r1027

Battle gives the following error:

golem/Rycochet's Castle Age Golem: [r901] [7:22:48 AM]: TypeError: 
this.get([tmp, "bp"], 0, "number") is null
->Page._update({"worker":"[worker 
Page]","self":true,"type":"trigger","id":"page_change","selector":"#app467550284
29_app_body_container, #app46755028429_globalContainer"})
  ->Page.update({"worker":"[worker Page]","self":true,"type":"trigger","id":"page_change","selector":"#app46755028429_app_body_container, #app46755028429_globalContainer"})
    ->Battle._flush()
      ->Battle._save()
        ->Battle._update({"type":"runtime","self":true,"worker":"[worker Battle]"})
          ->Battle.update({"type":"runtime","self":true,"worker":"[worker Battle]"})

And stops attack in war mode.

When page reloaded gives: 

golem/Rycochet's Castle Age Golem: [r901] [7:28:02 AM]: TypeError: 
this.get([tmp, "bp"], 0, "number") is null
->Battle._update({"type":"init","self":true,"worker":"[worker Battle]"})
  ->Battle.update({"type":"init","self":true,"worker":"[worker Battle]"})

And doesn't attack for War.

Original issue reported on code.google.com by 0Artifi...@gmail.com on 30 Mar 2011 at 10:28

GoogleCodeExporter commented 9 years ago
I think r1029 should fix it, was just added 4 minutes after you posted.

Original comment by lur...@hotmail.com on 30 Mar 2011 at 10:37

GoogleCodeExporter commented 9 years ago
Yup, that fixed it for Battle.  We have the same kind of errors for Guild 
battles when trying to select a target, and then it cycles through repeatedly 
without ever attacking.  Can this be fixed as well?

Original comment by 0Artifi...@gmail.com on 31 Mar 2011 at 12:41

GoogleCodeExporter commented 9 years ago
The fix around r1029 was a generic .get() fix for default values, not specific 
to any one worker. I'm not sure what the issue with Guild battles is, if it 
wasn't resolved by that .get() fix.

One thing to watch for now is that you can no longer rely on empty objects to 
persist in a data store, but this shouldn't be an issue if you use .get() with 
a default value. Also, I had a quick look and I saw a case of 
this.set(['data'], {}). If you intend to replace the root of a data store you 
should probably use this._replace('data', {}), or it may not properly fire off 
notifications, even with this._notify('data'). Those may not be at all related 
to whatever the issue is with guild, they are just things I noticed that could 
produce unexpected results.

Original comment by lur...@hotmail.com on 31 Mar 2011 at 1:07

GoogleCodeExporter commented 9 years ago
Yup, this seems to be working now.  Not sure what the issue was.  Closing.

Original comment by 0Artifi...@gmail.com on 2 Apr 2011 at 2:25