NetLogo / models

NetLogo Models Library
106 stars 95 forks source link

Bug Hunt Disruptions bug (no pun intended)? #139

Closed nicolaspayette closed 9 years ago

nicolaspayette commented 9 years ago

@nholbert says:

Setup with default settings, press go. Now when you press the "L-Infect Bugs" button, you get an error:

DISEASE-MARKERS breed does not own variable CURRENT-AGE
error while disease-marker 977 running CURRENT-AGE
called by procedure UPDATE-DISEASE
called by procedure GO
called by Button 'go/pause'
nicolaspayette commented 9 years ago

A related commit is probably https://github.com/NetLogo/models/commit/da2e96b6e76cdc6ebaaf60c43cb2f7d095d4b0e1 (just before 5.2.0) where current-age was added to embers, but not to disease-markers. The same commit added it to both breeds in Bug Hunt Environmental Changes. @arthurhjorth, any insight?

The code for update-disease clearly expects current-age to be there. I'm thinking that the variable should just be added.

nicolaspayette commented 9 years ago

Adding current-age to disease-markers-own seems to fix the problem (74c5446). Given the imminence of the release, I have pushed the fix directly to master and closed the issue, but...

@mnovakccl I would appreciate if you could give it a quick review!