My save has run into this error a few different times, which I've been able to work around by reloading an earlier save and then disabling some uses of bounce pads - I think it has something to do with long chains of bounce pads (we were throwing Ore from a mining base at distances more deserving of trains).
Error while running event RenaiTransportation::on_nth_tick(3)
Item stack count has to be a positive integer.
stack traceback:
[C]: in function 'insert'
__RenaiTransportation__/control.lua:124: in function <__RenaiTransportation__/control.lua:90>
I'm on 1.0.1, and hadn't seen it in 1.0.0 (though our base was smaller then). https://storage.googleapis.com/nt-ss/misc/renai-thrower-overflow-error-3s-before.zip is a save that reproduces it 3 seconds after loading.
In trying to debug it a bit, I found global.OnTheWay[properties.targets[catapult.held_stack.name].unit_number][catapult.held_stack.name]
was -6 in one instance, which meant the total
it tried to insert was -5, which crashes.
I was able to resume my save by adding an > 0
to control.lua L121's check:
and global.OnTheWay[properties.targets[catapult.held_stack.name].unit_number][catapult.held_stack.name] > 0) then
Though, I feel like it'd be better to alter script/event/FlyingItems.lua L371 and L385 to include a math.max(0, your_calculation)
guard or something, since that's the only way I can imagine the OnTheWay number could become negative, but (I'm not very familiar with Factorio modding) I couldn't figure out how to reload changes made to FlyingItems.lua in my save - it kept running the old one.
Thanks for the hilarious, amazing mod!