Here are the Lua commands involved:
a = math.random(1,2)
if a == 1 then
ScenEdit_AddUnit({type='Sub', side='USSR', name='B-23', dbid='187', latitude='49.3812997111192', longitude='-36.8903957715054'})
elseif a == 2 then
ScenEdit_AddUnit({type='Sub', side='USSR', name='B-25', dbid='147', latitude='49.3812997111192', longitude='-36.8903957715054'})
end
a = math.random(1,3)
if a == 1 then
ScenEdit_AddUnit({type='Sub', side='USSR',name='B-10', dbid='278', latitude='50.52351341355', longitude='-37.177899984719'})
elseif a == 2 then
ScenEdit_AddUnit({type='Sub', side='USSR',name='B-15', dbid='278', latitude='50.52351341355', longitude='-37.177899984719'})
elseif a == 3 then
ScenEdit_AddUnit({type='Sub', side='USSR',name='K-115', dbid='391', latitude='50.52351341355', longitude='-37.177899984719'})
end
a = math.random(1,3)
if a == 1 then
ScenEdit_AddUnit({type='Sub', side='USSR', name='K-18', dbid='159', latitude='49.8531552461574', longitude='-36.2143146634912'})
end
a=math.random(1,2)
if a == 1 then
ScenEdit_AddUnit({type='Sub', side='USSR', name='K-16', dbid='363', latitude='50.1531552461574', longitude='-36.3143146634912'})
elseif a == 2 then
ScenEdit_AddUnit({type='Sub', side='USSR', name='K-5', dbid='363', latitude='50.1531552461574', longitude='-36.3143146634912'})
end
ScenEdit_AddUnit({type='Sub', side='USSR', name='B-8', dbid='287', latitude='48.9941488964394', longitude='-35.8765853708755'})
a= math.random(1,2)
if a == 1 then
ScenEdit_AddUnit({type='Sub', side='USSR', name='B-7', dbid='287', latitude='50.051014008713', longitude='-41.5623833495527'})
end
When I set my OS'"Regional and Language Options" to English (United States) as below, or even Chinese (PRC), it works fine.
However when the is set to French (France), Russian or Polish (potentially others too), I've got that error popping-up and no sub is placed at all:
Now if I set my "Regional and Language Options" to French (Belgium), I've got no error popping-up but subs are scattered around:
Command is at Build 624, OS is Windows 7 64-bit Ultimate Edition.
Hope it helps.