Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

bug? zone at spot

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
sotrain515




Joined: 17 May 2010
Posts: 39
Location: Connecticut

PostPosted: Thu Oct 04, 2012 3:07 pm    Post subject: bug? zone at spot Reply with quote

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
View user's profile Send private message Send e-mail
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Fri Oct 05, 2012 3:22 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
sotrain515




Joined: 17 May 2010
Posts: 39
Location: Connecticut

PostPosted: Fri Oct 05, 2012 6:45 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat Oct 06, 2012 1:44 am    Post subject: Reply with quote

I'll tweak the wording, since it's not crystal clear.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group