View previous topic :: View next topic |
Author |
Message |
sotrain515
Joined: 17 May 2010 Posts: 39 Location: Connecticut
|
Posted: Thu Oct 04, 2012 3:07 pm Post subject: bug? zone at spot |
|
|
Okay, the wiki says to report bugs on the forum, so I guess here's as good a place as any. According to the plotscripting dictionary, the zone at spot function, when passed the get count constant, should return the count of zones on that square or 0 (false) if too many overlap. I find that its behavior is one off from that; so a tile containing 2 zones returns a 1, a tile with 1 zone a 0 and a tile with no zones a -1.
This is obviously easy to work around, but it seems to be different from how get count works in other functions (and also how it's described in the dictionary). |
|
Back to top |
|
|
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Fri Oct 05, 2012 3:22 am Post subject: |
|
|
Thanks for reporting that. Opps.
Hmm, we have to be cautious when fixing bugs like this, because they might break existing games which employ the workaround you suggested. I opted to fix it (in the nightly builds), because it's a fairly new and probably rarely used command, and if anyone had noticed the bug and used the workaround, then it's their fault for not reporting it!
Quote: | ...should return the count of zones on that square or 0 (false) if too many overlap |
You have the second part of that wrong. It should always return the number of zones on that tile. But you can't place more than 15 zones on a single tile at all. _________________ "It is so great it is insanely great." |
|
Back to top |
|
|
sotrain515
Joined: 17 May 2010 Posts: 39 Location: Connecticut
|
Posted: Fri Oct 05, 2012 6:45 am Post subject: |
|
|
TMC wrote: | Thanks for reporting that. Opps.
You have the second part of that wrong. It should always return the number of zones on that tile. But you can't place more than 15 zones on a single tile at all. |
I see, I misread the part that says "if count is too large, 0 will be returned". I took that to mean <count of zones on a tile that overlap> for some reason... I think I had just read the write zone function which mentions not being able to have more than 15 zones overlap, as you said.
Anyway, thanks! |
|
Back to top |
|
|
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat Oct 06, 2012 1:44 am Post subject: |
|
|
I'll tweak the wording, since it's not crystal clear. _________________ "It is so great it is insanely great." |
|
Back to top |
|
|
|