Here are the results
And the following is the script which includes the error:
1function INIT_ObjFirstObjective()
2
3 print("Initializing ObjExample...")
4 OBJ_FirstObjective = {
(Here's the "{")
5 --Info
6 Title = LOC("Capture the points"), --The objective's text
7 TitleEnd = LOC("well done"), -- The the message displayed on completion
8 TitleFail = nil, -- The message displayed on failure
9 Type = OT_Primary, -- This defines the type of objective (and by extension how it is displayed to the player)
10 Parent = nil, -- If this objective has a parent, the parent objective is put here
11 subObjectives = {}, --Any subobjectives to a parent objective
12
13 --Intel
14 Intel_Start = nil,
15 Intel_Start_SkipFunc = nil,
16 Intel_Complete = nil,
17 Intel_Complete_SkipFunc = nil,
18 Intel_Fail = nil,
19 Intel_Fail_SkipFunc = nil
20
21 --Functions
22 SetupUI = function() --A function to setup any UI elements for the objective
(Here is where the console tells me to close the "{" in line 4)
23 end,
24 PreStart = nil, --A function called to setup anything required for the objective, before the objective is kicked off
25 OnStart = function() --A function called when the objective is started
26 Event_PlayerOwnsTerritory(EventHandler_ObjectiveComplete, {objective = OBJ_FirstObjective}, player1, eg_objTerritoryPoint, 1) -- The event system can be used in conjunction with handlers. Handlers give preset functionality (in this case completing the given objective)
27 end,
28 IsComplete = nil, -- A function that returns a boolean describing when the objective is complete
29 PreComplete = nil, --A function called immediately prior to completing an objective
30 OnComplete = function() --A function called when the objective is complete
31 EGroup_SetPlayerOwner(eg_playerBase, player1)
32 World_IncreaseInteractionStage()
33 Objective_Start(OBJ_SecondObjective)
34 end,
35 IsFailed = nil, -- A function that returns a boolean describing when the objective is failed
36 PreFail = nil, --A function called immediately prior to failing an objective
37 OnFail = nil, --A function called when the objective is failed
38 }
39 end
40 Scar_AddInit(INIT_ObjFirstObjective)
But if I closed the "{" in line 22, how would the rest of the objective be defined?