KnightHawk75
Posts: 1450
Joined: 11/15/2018 Status: offline
|
Second section - you're are missing a comma in the line local c,u,<-- retval Also on the line: u = ScenEdit_AddUnit({type = 'Aircraft', name = "Dog", loadoutid = 17020, heading = 85, dbid = 46, side = 'USN', Latitude='N32.51.55', Longitude = "W13.43.21', autodetectable=false,holdfire="false", proficiency=4, speed=350, basename=USS George Washington}); -You have Longitude opened with a " and closed with a ' , you can use one or the other type not mix and match -You have the string USS George Washinton without quotes around it. -You specify basename= when it should just be base= -You specified to create and aircraft but didn't specify a Altitude, which is required even if basing it. Also you are missing the 'N' in lat's in many places. Here is the corrected version of what you posted that runs without issue.
local u,c;
local grpName = 'George Washington CSG'
c = ScenEdit_AddUnit({type = 'Ship', name = 'USS George Washington', heading = 85, dbid = 657, side = 'USN',
Latitude = "N32.51.55", Longitude = "W13.43.21", autodetectable="false",holdfire="false",proficiency=4,speed=20});
c.group=grpName;
u = ScenEdit_AddUnit({type = 'Aircraft', name = "Dog", loadoutid = 17020, heading = 85, dbid = 46, side = 'USN',
Latitude='N32.51.55', Longitude = 'W13.43.21', altitude=0,autodetectable="false",holdfire="false", proficiency=4, speed=350, base=c.name});
u = ScenEdit_AddUnit({type = 'Ship', name = 'USS Thomas S. Gates', heading = 85, dbid = 1054, side = 'USN',
Latitude = "32.51.55", Longitude = "W13.43.21", autodetectable="false",holdfire="false",proficiency=4,speed=20});
u.group=grpName
u = ScenEdit_AddUnit({type = 'Ship', name = 'USS San Jacinto', heading = 85, dbid = 628, side = 'USN',
Latitude = "N32.51.55", Longitude = "W13.43.21", autodetectable="false",holdfire="false",proficiency=4,speed=20});
u.group=grpName
u = ScenEdit_AddUnit({type = 'Ship', name = 'USS Barry', heading = 85, dbid = 112, side = 'USN',
Latitude = "N32.51.55", Longitude = "W13.43.21", autodetectable="false",holdfire="false",proficiency=4,speed=20});
u.group=grpName
u = ScenEdit_AddUnit({type = 'Ship', name = 'USS Deyo', heading = 85, dbid = 810, side = 'USN',
Latitude = "N32.51.55", Longitude = "W13.43.21", autodetectable="false",holdfire="false",proficiency=4,speed=20});
c,u = nil,nil;
On the first I get no such error about sequence.... when you run it do you actually have a Side called Blue?
< Message edited by KnightHawk75 -- 6/6/2020 7:47:44 AM >
|