From 6d7ca0dd48066866205ad9471587ed0e4c82b2c5 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Fri, 21 Sep 2018 21:30:03 +0100 Subject: [PATCH] Fixed error in paths on_entiy placed --- StandAlone/paths.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StandAlone/paths.lua b/StandAlone/paths.lua index 0bfe24e9..5bf74cf7 100644 --- a/StandAlone/paths.lua +++ b/StandAlone/paths.lua @@ -124,7 +124,7 @@ Event.register({defines.events.on_built_entity,on_robot_built_entity}, function( for x = -size,0 do for y = -size,0 do local pos = {entity.position.x+x,entity.position.y+y} local tile = surface.get_tile(pos).name - if math.random() < paths[tile][1]*size*(-10) then + if paths[tile] and math.random() < paths[tile][1]*size*(-10) then down_grade(surface,pos) end end end