{"action":"created","issue":{"url":"https://api.github.com/repos/paulofmandown/rotLove/issues/12","repository_url":"https://api.github.com/repos/paulofmandown/rotLove","labels_url":"https://api.github.com/repos/paulofmandown/rotLove/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/paulofmandown/rotLove/issues/12/comments","events_url":"https://api.github.com/repos/paulofmandown/rotLove/issues/12/events","html_url":"https://github.com/paulofmandown/rotLove/issues/12","id":176629054,"number":12,"title":"Cellular crashes if survive is supplied","user":{"login":"globalcitizen","id":505366,"avatar_url":"https://avatars.githubusercontent.com/u/505366?v=3","gravatar_id":"","url":"https://api.github.com/users/globalcitizen","html_url":"https://github.com/globalcitizen","followers_url":"https://api.github.com/users/globalcitizen/followers","following_url":"https://api.github.com/users/globalcitizen/following{/other_user}","gists_url":"https://api.github.com/users/globalcitizen/gists{/gist_id}","starred_url":"https://api.github.com/users/globalcitizen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/globalcitizen/subscriptions","organizations_url":"https://api.github.com/users/globalcitizen/orgs","repos_url":"https://api.github.com/users/globalcitizen/repos","events_url":"https://api.github.com/users/globalcitizen/events{/privacy}","received_events_url":"https://api.github.com/users/globalcitizen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-13T12:36:56Z","updated_at":"2016-09-13T12:45:49Z","closed_at":"2016-09-13T12:45:49Z","body":"I am trying to develop a roguelike to release for [2016 ARRP](http://www.roguebasin.com/index.php?title=2016_ARRP). You can have a look at it on [Roguebasin](http://www.roguebasin.com/index.php?title=Zomia) or [Github](https://github.com/globalcitizen/zomia). It's coming together pretty well!\r\n\r\nUnfortunately I have run in to another issue, again with Cellular, and I do need it because I am attempting to port the entire physical dungeon generation algorithm from [Brogue](https://sites.google.com/site/broguegame/).\r\n\r\nUnfortunately I only have a few days left, so I am hoping you will have time to help out again 👍 \r\n\r\nThe function source... \r\n```\r\nfunction ROT.Map.Cellular:create(callback)\r\n    local newMap =self:_fillMap(0)\r\n    local born   =self._options.born\r\n    local survive=self._options.survive\r\n    local changed=false\r\n\r\n    for j=1,self._height do\r\n        for i=1,self._width do\r\n            local cur   =self._map[i][j]\r\n            local ncount=self:_getNeighbors(i, j)\r\n            if cur>0 and table.indexOf(survive, ncount)>0 then\r\n                newMap[i][j]=1\r\n```\r\n\r\nCrashes with:\r\n```\r\nError: rotLove.lua:104: attempt to get length of local 'values' (a number value)\r\nstack traceback:\r\n       \trotLove.lua:104: in function 'indexOf'\r\n       \trotLove.lua:1944: in function 'create'\r\n```\r\n\r\nrotLove.lua:1944 is:\r\n```\r\n            if cur>0 and table.indexOf(survive, ncount)>0 then\r\n```\r\n\r\nI am calling it like:\r\n```\r\n        cl = ROT.Map.Cellular:new(minwidth,maxwidth,{topology=8,minimumZoneArea=math.max(minheight,minwidth),survive=4})\r\n        cl:randomize(.50)\r\n        cl:create(my_callback_helper)\r\n```"},"comment":{"url":"https://api.github.com/repos/paulofmandown/rotLove/issues/comments/246669580","html_url":"https://github.com/paulofmandown/rotLove/issues/12#issuecomment-246669580","issue_url":"https://api.github.com/repos/paulofmandown/rotLove/issues/12","id":246669580,"user":{"login":"globalcitizen","id":505366,"avatar_url":"https://avatars.githubusercontent.com/u/505366?v=3","gravatar_id":"","url":"https://api.github.com/users/globalcitizen","html_url":"https://github.com/globalcitizen","followers_url":"https://api.github.com/users/globalcitizen/followers","following_url":"https://api.github.com/users/globalcitizen/following{/other_user}","gists_url":"https://api.github.com/users/globalcitizen/gists{/gist_id}","starred_url":"https://api.github.com/users/globalcitizen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/globalcitizen/subscriptions","organizations_url":"https://api.github.com/users/globalcitizen/orgs","repos_url":"https://api.github.com/users/globalcitizen/repos","events_url":"https://api.github.com/users/globalcitizen/events{/privacy}","received_events_url":"https://api.github.com/users/globalcitizen/received_events","type":"User","site_admin":false},"created_at":"2016-09-13T12:45:49Z","updated_at":"2016-09-13T12:45:49Z","body":"Verified that works."}}
{"actor":{"display_login":"globalcitizen"}}