How to split lua script in multiple files

frutiemax

Warlord
Joined
Jan 19, 2015
Messages
127
How do you split the lua script in multiple files?

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.

upload_2021-6-30_22-23-38.png


upload_2021-6-30_22-24-36.png
 
Back
Top Bottom