How do you split the lua script in multiple files?
I have this file RealisticMap_Tectonics.lua:
I'm trying to use this function in an another file but it doesn't seem to correctly include it. I have the include "RealisticMap_Tectonics" instruction at the beginning and I've also added an import instruction. The add map only has the lua file with the entry point.
I have this file RealisticMap_Tectonics.lua:
Code:
-- RealisticMap_Tectonics
-- Author: lucas
-- DateCreated: 6/30/2021 7:34:46 PM
--------------------------------------------------------------
include "MapEnums"
include "MapUtilities"
include "MountainsCliffs"
include "RiversLakes"
include "FeatureGenerator"
include "TerrainGenerator"
include "NaturalWonderGenerator"
include "ResourceGenerator"
include "CoastalLowlands"
include "AssignStartingPlots"
function test()
print("test")
end
I'm trying to use this function in an another file but it doesn't seem to correctly include it. I have the include "RealisticMap_Tectonics" instruction at the beginning and I've also added an import instruction. The add map only has the lua file with the entry point.