Jump to content

Help with LSOView coding


Nealius

Recommended Posts

So, after making my custom Stennis cameras mod, I'm working on doing the same with the Tarawa, but things aren't working right.

 

I can edit the LSOView coordinates just fine, and they work, but I cannot comment out views to select a specific one from the list.

 

GT.LSOView = {
cockpit = "empty", 
position = {
	--[[connector = "",]] 
	offset = {-68.0, 21.0, -21.00, 0.0, 0.0}
} 
} ---Elev. Port
GT.LSOView = {
cockpit = "empty", 
position = {
	--[[connector = "",]] 
	offset = {-115.0, 21.5, -16.00, 0.0, 0.0}
} 
} ---Stern Port
GT.LSOView = {
cockpit = "empty", 
position = {
	--[[connector = "",]] 
	offset = {-123.0, 21.5, 7.00, 0.0, 0.0}
} 
} ---Stern Starboard
GT.LSOView = {
cockpit = "empty", 
position = {
	--[[connector = "",]] 
	offset = {-45.0, 21.5, 3.00, 120.0, 0.0}
} 
} ---Forklift

 

With the above code, DCS chooses the last LSOView in the list. In this case, "Forklift." However, if I want to disable "Forklift" and use "Stern Starboard," I would normally comment out the "Forklift" view simply by placing two hyphens like this:

 

--GT.LSOView = {
cockpit = "empty", 
position = {
	--[[connector = "",]] 
	offset = {-45.0, 21.5, 3.00, 120.0, 0.0}
} 
} ---Forklift

 

With the Stennis's code, this works perfectly fine. With the Tarawa, this causes a failure to load any mission with the Tarawa in it. Upon trying to load a Tarawa mission, the loading screen will get stuck at "Terrain Graphics Init: 97, (mapname).ng." The DCS log gives a GUI error and then enters "State 5," whatever that means:

 

2018-10-12 09:18:27.673 ALERT LUACOMMON: Error: GUI Error: [string "./MissionEditor/modules/me_mission.lua"]:1206: attempt to index local 'unit' (a nil value)

GUI debug.traceback: stack traceback:

[C]: ?

[string "./MissionEditor/modules/me_mission.lua"]:1206: in function 'fixWaypointsLinks'

[string "./MissionEditor/modules/me_mission.lua"]:1643: in function 'load'

[string "./MissionEditor/modules/me_openfile.lua"]:622: in function 'func'

[string "./Scripts/UI/ProgressBarDialog.lua"]:138: in function 'updater'

[string "./Scripts/UpdateManager.lua"]:64: in function <[string "./Scripts/UpdateManager.lua"]:40>

2018-10-12 09:18:43.398 INFO EDCORE: (dDispatcher)enterToState_:5

 

I cannot figure out why this is happening. The only difference I can see between the Stennis's .lua file and the Tarawa's .lua file is that with the Stennis, the LSOView codes are all a single line, whereas the Tarawa's LSOView codes are 7 lines. Perhaps I am messing up the format?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...