No, ScenEdit_EndScenario() takes no parameters.  
I'm not sure what you're asking here, what are you trying to do\accomplish?
You would generally just define your in-area trigger in gui tools, and then for the action use built in end scenario in the list of actions (no lua required..), or if you have more you want to condition it upon ...you can use a 'condition' or a 'lua script' that that has similar logic and calls to  ScenEdit_EndScenario().
For the later if say you are asking like in an area trigger for 1 thing if you want to check if something else is also in a certain area... like say we have objectA that triggers the event and is in Area A, and then you want to check if object b is inside some area (same or other), and end the scene if it is true but not end the scene if it's false.
Code: Select all
local objectB = SE_GetUnit({guid="some-guidhere"});  --get the object to check into a var.
if (objectB ~=nil) and objectB:inArea=({'RP-214', 'RP-215', 'RP-216', 'RP-217'}) then -- make sure it's not nil and check area
  print("debug: objectB is in the specified area, ending scene");
  ScenEdit_EndScenario();  --end scene
else
  print("debug: objectB is not in the specified area");
end
You could just make it a condition as well and use it that way, instead of invoking EndScene, you could just have the condition return true and false.
I attached a basic demo (build 1307+) showing both of the first 2 with requirement that 787 be in a certain area-B (pink\purple) in addition to a aircraft unit (b-52) triggering the check by entering area-A (yellow).   Or .. Are you asking how to script the creation of an In Area trigger dynamically?