Need help with " ')' expected near '.' "-error
Posted: Sat Mar 09, 2019 6:50 pm
I've been having this error with a scenario that i build:
TIA!
but after looking at the code for hours for the mistake i need some help. The function that fails (grid.lua:120) is below tough i've attached the entire grid.lua as part of the zip file....Data/Roaming/Factorio/temp/currently-playing/control.lua:57: ...ta/Roaming/Factorio/temp/currently-playing/maps/grid.lua:120: ')' expected near '.'
stack traceback:
[C]: in function 'require'
...Data/Roaming/Factorio/temp/currently-playing/control.lua:57: in main chunk
Code: Select all
function grid_remove_ore_in_chunk(event.area)
local area = event.area
local entitiesSpawned = game.surfaces["nauvis"].find_entities({area.left_top.x, area.left_top.y}, {area.right_bottom.x, area.right_bottom.y})
for _,v in pairs(entitiesSpawned) do
if(v.type == "resource" or v.type == "decorative") then
v.destroy()
end
end
end