Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash: attempt to index local 'squad' (a nil value) #97

Closed
thisismynombre opened this issue Apr 14, 2017 · 2 comments
Closed

Crash: attempt to index local 'squad' (a nil value) #97

thisismynombre opened this issue Apr 14, 2017 · 2 comments

Comments

@thisismynombre
Copy link

thisismynombre commented Apr 14, 2017

This morning, I was messing around with destroyer droids. I changed the squad size to 100, and the retreat size to 40, via the settings module. Then I setup a circuit between an activity module and an inserter arm to maintain a total army of 200.

The first group of 100 went off hunting just fine. I left them alone for a while, and when I came back, I noticed that there were ~150 droids just buzzing around the assembling machine. I tried using the rally point to get them all to reconnoiter, but only about half of them responded to the rally flag. Then I started running around and picking them up. While I was picking them up, I was getting a lot of "squad is no more messages." After I had picked up like 50 of them, I got this error:

Error MainLoop.cpp:788: Exception at tick 5212150: Error while running event on_tick (ID 0)
__robotarmy__/robolib/Squad.lua:728: attempt to index local 'squad' (a nil value)

Log files:
robot_army_logs.zip
factorio-current.zip

@kyranf
Copy link
Owner

kyranf commented Apr 14, 2017 via email

@kyranf
Copy link
Owner

kyranf commented Apr 15, 2017

I updated the squad.lua file with a check that should fix the error you found. It was probably a rare case where a squad was removed in the same tick but before the artifact gather function was called, with the squad now being nil by the time that function was called.

@kyranf kyranf closed this as completed Apr 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants