Jump to content
Sign in to follow this  
BlackIce

Switch Do Use w/ Random Command

Recommended Posts

I have this script that I have been working on for days trying to figure out where I have gone wrong in the syntax. Everything appears right, but yet all 6 bases spawn in with all assigned OPFOR to their respective bases. I'm wanting one base spawned at one of the six locations.

Code:

if (isServer) then {goto "start"} else {goto "exit"};

#start

_eastgrp = createGroup East;

_rndmspwn = floor(random 6);

switch (_rndmspwn) do {

case 1: {"Ins_Soldier_1" createUnit [getmarkerpos "Bunker A", _eastgrp, "this setpos [(getmarkerpos ""B1"" select 0), (getmarkerpos ""B2"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_2" createUnit [getmarkerpos "Bunker A", _eastgrp, "this setpos [(getmarkerpos ""B3"" select 0), (getmarkerpos ""B1"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_AR" createUnit [getmarkerpos "Bunker A", _eastgrp, "this setpos [(getmarkerpos ""B2"" select 0), (getmarkerpos ""B3"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sab" createUnit [getmarkerpos "Bunker A", _eastgrp, "this setpos [(getmarkerpos ""B1"" select 0), (getmarkerpos ""B4"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Bardak" createUnit [getmarkerpos "Bunker A", _eastgrp, "this setpos [(getmarkerpos ""B4"" select 0), (getmarkerpos ""B2"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B1", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B2", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B3", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B4", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sapper" createUnit [getmarkerpos "B1", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_GL" createUnit [getmarkerpos "B2", _eastgrp, "this addEventHandler [""killed"",{_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_AA" createUnit [getmarkerpos "B3", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_AT" createUnit [getmarkerpos "B4", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_CO" createUnit [getmarkerpos "Bunker A", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Commander" createUnit [getmarkerpos "Bunker A", _eastgrp, "cmdr = this; this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Lopotev" createUnit [getmarkerpos "Bunker A", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_2" createUnit [getmarkerpos "B1", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_1" createUnit [getmarkerpos "B2", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B3", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

_bunker = createVehicle ["Land_fortified_nest_big", getmarkerpos "B1", [], 1, "NONE"];

_bunker1 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B2", [], 1, "NONE"];

_bunker2 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B3", [], 1, "NONE"];

_bunker3 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B4", [], 1, "NONE"];

_CommandTent = createVehicle ["Land_tent_east", getmarkerpos "Bunker A", [], 1, "NONE"];

};

case 2: {"Ins_Soldier_1" createUnit [getmarkerpos "Bunker B", _eastgrp, "this setpos [(getmarkerpos ""B6"" select 0), (getmarkerpos ""B7"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_2" createUnit [getmarkerpos "Bunker B", _eastgrp, "this setpos [(getmarkerpos ""B8"" select 0), (getmarkerpos ""B6"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_AR" createUnit [getmarkerpos "Bunker B", _eastgrp, "this setpos [(getmarkerpos ""B7"" select 0), (getmarkerpos ""B8"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sab" createUnit [getmarkerpos "Bunker B", _eastgrp, "this setpos [(getmarkerpos ""B6"" select 0), (getmarkerpos ""B9"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Bardak" createUnit [getmarkerpos "Bunker B", _eastgrp, "this setpos [(getmarkerpos ""B9"" select 0), (getmarkerpos ""B7"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B7", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B8", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B9", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B6", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sapper" createUnit [getmarkerpos "B7", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_GL" createUnit [getmarkerpos "B8", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_AA" createUnit [getmarkerpos "B9", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_AT" createUnit [getmarkerpos "B6", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_CO" createUnit [getmarkerpos "Bunker B", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Commander" createUnit [getmarkerpos "Bunker B", _eastgrp, "cmdr = this; this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Lopotev" createUnit [getmarkerpos "Bunker B", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_2" createUnit [getmarkerpos "B7", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_1" createUnit [getmarkerpos "B8", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B9", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

_bunker = createVehicle ["Land_fortified_nest_big", getmarkerpos "B6", [], 1, "NONE"];

_bunker1 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B7", [], 1, "NONE"];

_bunker2 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B8", [], 1, "NONE"];

_bunker3 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B9", [], 1, "NONE"];

_CommandTent = createVehicle ["Land_tent_east", getmarkerpos "Bunker B", [], 1, "NONE"];

};

case 3: {"Ins_Soldier_1" createUnit [getmarkerpos "Bunker C", _eastgrp, "this setpos [(getmarkerpos ""B11"" select 0), (getmarkerpos ""B12"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_2" createUnit [getmarkerpos "Bunker C", _eastgrp, "this setpos [(getmarkerpos ""B13"" select 0), (getmarkerpos ""B11"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_AR" createUnit [getmarkerpos "Bunker C", _eastgrp, "this setpos [(getmarkerpos ""B14"" select 0), (getmarkerpos ""B12"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sab" createUnit [getmarkerpos "Bunker C", _eastgrp, "this setpos [(getmarkerpos ""B14"" select 0), (getmarkerpos ""B11"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Bardak" createUnit [getmarkerpos "Bunker C", _eastgrp, "this setpos [(getmarkerpos ""B13"" select 0), (getmarkerpos ""B12"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B11", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B12", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B13", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B14", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sapper" createUnit [getmarkerpos "B11", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_GL" createUnit [getmarkerpos "B12", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_AA" createUnit [getmarkerpos "B13", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_AT" createUnit [getmarkerpos "B14", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_CO" createUnit [getmarkerpos "Bunker C", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Commander" createUnit [getmarkerpos "Bunker C", _eastgrp, "cmdr = this; this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Lopotev" createUnit [getmarkerpos "Bunker C", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_2" createUnit [getmarkerpos "B11", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_1" createUnit [getmarkerpos "B12", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B13", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

_bunker = createVehicle ["Land_fortified_nest_big", getmarkerpos "B11", [], 1, "NONE"];

_bunker1 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B12", [], 1, "NONE"];

_bunker2 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B13", [], 1, "NONE"];

_bunker3 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B14", [], 1, "NONE"];

_CommandTent = createVehicle ["Land_tent_east", getmarkerpos "Bunker C", [], 1, "NONE"];

};

case 4: {"Ins_Soldier_1" createUnit [getmarkerpos "Bunker D", _eastgrp, "this setpos [(getmarkerpos ""B16"" select 0), (getmarkerpos ""B17"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_2" createUnit [getmarkerpos "Bunker D", _eastgrp, "this setpos [(getmarkerpos ""B18"" select 0), (getmarkerpos ""B19"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_AR" createUnit [getmarkerpos "Bunker D", _eastgrp, "this setpos [(getmarkerpos ""B16"" select 0), (getmarkerpos ""B19"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sab" createUnit [getmarkerpos "Bunker D", _eastgrp, "this setpos [(getmarkerpos ""B17"" select 0), (getmarkerpos ""B18"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Bardak" createUnit [getmarkerpos "Bunker D", _eastgrp, "this setpos [(getmarkerpos ""B17"" select 0), (getmarkerpos ""B16"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B16", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B17", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B18", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B19", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sapper" createUnit [getmarkerpos "B16", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_GL" createUnit [getmarkerpos "B17", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_AA" createUnit [getmarkerpos "B18", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_AT" createUnit [getmarkerpos "B19", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_CO" createUnit [getmarkerpos "Bunker D", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Commander" createUnit [getmarkerpos "Bunker D", _eastgrp, "cmdr = this; this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Lopotev" createUnit [getmarkerpos "Bunker D", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_2" createUnit [getmarkerpos "B16", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_1" createUnit [getmarkerpos "B17", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B18", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

_bunker = createVehicle ["Land_fortified_nest_big", getmarkerpos "B19", [], 1, "NONE"];

_bunker1 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B18", [], 1, "NONE"];

_bunker2 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B17", [], 1, "NONE"];

_bunker3 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B16", [], 1, "NONE"];

_CommandTent = createVehicle ["Land_tent_east", getmarkerpos "Bunker D", [], 1, "NONE"];

};

case 5: {"Ins_Soldier_1" createUnit [getmarkerpos "Bunker E", _eastgrp, "this setpos [(getmarkerpos ""B21"" select 0), (getmarkerpos ""B22"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_2" createUnit [getmarkerpos "Bunker E", _eastgrp, "this setpos [(getmarkerpos ""B21"" select 0), (getmarkerpos ""B24"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_AR" createUnit [getmarkerpos "Bunker E", _eastgrp, "this setpos [(getmarkerpos ""B23"" select 0), (getmarkerpos ""B22"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sab" createUnit [getmarkerpos "Bunker E", _eastgrp, "this setpos [(getmarkerpos ""B24"" select 0), (getmarkerpos ""B23"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Bardak" createUnit [getmarkerpos "Bunker E", _eastgrp, "this setpos [(getmarkerpos ""B22"" select 0), (getmarkerpos ""B21"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B21", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B22", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B23", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B24", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sapper" createUnit [getmarkerpos "B21", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_GL" createUnit [getmarkerpos "B22", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_AA" createUnit [getmarkerpos "B23", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_AT" createUnit [getmarkerpos "B24", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_CO" createUnit [getmarkerpos "Bunker E", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Commander" createUnit [getmarkerpos "Bunker E", _eastgrp, "cmdr = this; this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Lopotev" createUnit [getmarkerpos "Bunker E", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_2" createUnit [getmarkerpos "B21", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_1" createUnit [getmarkerpos "B22", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B23", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

_bunker = createVehicle ["Land_fortified_nest_big", getmarkerpos "B21", [], 1, "NONE"];

_bunker1 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B22", [], 1, "NONE"];

_bunker2 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B23", [], 1, "NONE"];

_bunker3 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B24", [], 1, "NONE"];

_CommandTent = createVehicle ["Land_tent_east", getmarkerpos "Bunker E", [], 1, "NONE"];

};

case 6: {"Ins_Soldier_1" createUnit [getmarkerpos "Bunker F", _eastgrp, "this setpos [(getmarkerpos ""B26"" select 0), (getmarkerpos ""B29"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_2" createUnit [getmarkerpos "Bunker F", _eastgrp, "this setpos [(getmarkerpos ""B27"" select 0), (getmarkerpos ""B28"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_AR" createUnit [getmarkerpos "Bunker F", _eastgrp, "this setpos [(getmarkerpos ""B29"" select 0), (getmarkerpos ""B27"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sab" createUnit [getmarkerpos "Bunker F", _eastgrp, "this setpos [(getmarkerpos ""B26"" select 0), (getmarkerpos ""B28"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Bardak" createUnit [getmarkerpos "Bunker F", _eastgrp, "this setpos [(getmarkerpos ""B27"" select 0), (getmarkerpos ""B29"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B26", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B27", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B28", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B29", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sapper" createUnit [getmarkerpos "B26", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_GL" createUnit [getmarkerpos "B27", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_AA" createUnit [getmarkerpos "B28", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_AT" createUnit [getmarkerpos "B29", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_CO" createUnit [getmarkerpos "Bunker F", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Commander" createUnit [getmarkerpos "Bunker F", _eastgrp, "cmdr = this; this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Lopotev" createUnit [getmarkerpos "Bunker F", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_2" createUnit [getmarkerpos "B26", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_1" createUnit [getmarkerpos "B27", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

"Ins_Soldier_Sniper" createUnit [getmarkerpos "B28", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];

_bunker = createVehicle ["Land_fortified_nest_big", getmarkerpos "B26", [], 1, "NONE"];

_bunker1 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B27", [], 1, "NONE"];

_bunker2 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B28", [], 1, "NONE"];

_bunker3 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B29", [], 1, "NONE"];

_CommandTent = createVehicle ["Land_tent_east", getmarkerpos "Bunker F", [], 1, "NONE"];};

};

#exit

exit;

I cannot figure out why I get an error message saying "'};' error missing {". Thanks for your help in advance.

Share this post


Link to post
Share on other sites

Because you're mixing SQS and SQF together in one script. Use one or the other. Read the front page threads, one already talks about this disconcerting pattern of people mixing SQS and SQF for unfathomable reasons. :)

Also use code tags.

Also also if you're typing something more than one, make it a function.

A good rule of thumb for examples might be: If the example is from before 2010, ignore it and find a more recent one. Everything's been asked a billion times, but if you stick to recent examples you won't ever end up trying to use GOTO for anything, ever. I don't even GOTO the store, I moveInShopping there.

Edited by kylania

Share this post


Link to post
Share on other sites

if (isServer) then {
_eastgrp = createGroup East;
_rndmspwn = floor(random 6);
switch (_rndmspwn) do {
	case 1: {
		"Ins_Soldier_1" createUnit [getmarkerpos "Bunker A", _eastgrp, "this setpos [(getmarkerpos ""B1"" select 0), (getmarkerpos ""B2"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_2" createUnit [getmarkerpos "Bunker A", _eastgrp, "this setpos [(getmarkerpos ""B3"" select 0), (getmarkerpos ""B1"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_AR" createUnit [getmarkerpos "Bunker A", _eastgrp, "this setpos [(getmarkerpos ""B2"" select 0), (getmarkerpos ""B3"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sab" createUnit [getmarkerpos "Bunker A", _eastgrp, "this setpos [(getmarkerpos ""B1"" select 0), (getmarkerpos ""B4"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Bardak" createUnit [getmarkerpos "Bunker A", _eastgrp, "this setpos [(getmarkerpos ""B4"" select 0), (getmarkerpos ""B2"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B1", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B2", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B3", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B4", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sapper" createUnit [getmarkerpos "B1", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_GL" createUnit [getmarkerpos "B2", _eastgrp, "this addEventHandler [""killed"",{_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_AA" createUnit [getmarkerpos "B3", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_AT" createUnit [getmarkerpos "B4", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_CO" createUnit [getmarkerpos "Bunker A", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Commander" createUnit [getmarkerpos "Bunker A", _eastgrp, "cmdr = this; this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Lopotev" createUnit [getmarkerpos "Bunker A", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_2" createUnit [getmarkerpos "B1", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_1" createUnit [getmarkerpos "B2", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B3", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		_bunker = createVehicle ["Land_fortified_nest_big", getmarkerpos "B1", [], 1, "NONE"];
		_bunker1 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B2", [], 1, "NONE"];
		_bunker2 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B3", [], 1, "NONE"];
		_bunker3 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B4", [], 1, "NONE"];
		_CommandTent = createVehicle ["Land_tent_east", getmarkerpos "Bunker A", [], 1, "NONE"];
	};

	case 2: {
		"Ins_Soldier_1" createUnit [getmarkerpos "Bunker B", _eastgrp, "this setpos [(getmarkerpos ""B6"" select 0), (getmarkerpos ""B7"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_2" createUnit [getmarkerpos "Bunker B", _eastgrp, "this setpos [(getmarkerpos ""B8"" select 0), (getmarkerpos ""B6"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_AR" createUnit [getmarkerpos "Bunker B", _eastgrp, "this setpos [(getmarkerpos ""B7"" select 0), (getmarkerpos ""B8"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sab" createUnit [getmarkerpos "Bunker B", _eastgrp, "this setpos [(getmarkerpos ""B6"" select 0), (getmarkerpos ""B9"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Bardak" createUnit [getmarkerpos "Bunker B", _eastgrp, "this setpos [(getmarkerpos ""B9"" select 0), (getmarkerpos ""B7"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B7", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B8", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B9", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B6", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sapper" createUnit [getmarkerpos "B7", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_GL" createUnit [getmarkerpos "B8", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_AA" createUnit [getmarkerpos "B9", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_AT" createUnit [getmarkerpos "B6", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_CO" createUnit [getmarkerpos "Bunker B", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Commander" createUnit [getmarkerpos "Bunker B", _eastgrp, "cmdr = this; this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Lopotev" createUnit [getmarkerpos "Bunker B", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_2" createUnit [getmarkerpos "B7", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_1" createUnit [getmarkerpos "B8", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B9", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		_bunker = createVehicle ["Land_fortified_nest_big", getmarkerpos "B6", [], 1, "NONE"];
		_bunker1 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B7", [], 1, "NONE"];
		_bunker2 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B8", [], 1, "NONE"];
		_bunker3 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B9", [], 1, "NONE"];
		_CommandTent = createVehicle ["Land_tent_east", getmarkerpos "Bunker B", [], 1, "NONE"];
	};

	case 3: {
		"Ins_Soldier_1" createUnit [getmarkerpos "Bunker C", _eastgrp, "this setpos [(getmarkerpos ""B11"" select 0), (getmarkerpos ""B12"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_2" createUnit [getmarkerpos "Bunker C", _eastgrp, "this setpos [(getmarkerpos ""B13"" select 0), (getmarkerpos ""B11"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_AR" createUnit [getmarkerpos "Bunker C", _eastgrp, "this setpos [(getmarkerpos ""B14"" select 0), (getmarkerpos ""B12"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sab" createUnit [getmarkerpos "Bunker C", _eastgrp, "this setpos [(getmarkerpos ""B14"" select 0), (getmarkerpos ""B11"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Bardak" createUnit [getmarkerpos "Bunker C", _eastgrp, "this setpos [(getmarkerpos ""B13"" select 0), (getmarkerpos ""B12"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B11", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B12", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B13", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B14", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sapper" createUnit [getmarkerpos "B11", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_GL" createUnit [getmarkerpos "B12", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_AA" createUnit [getmarkerpos "B13", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_AT" createUnit [getmarkerpos "B14", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_CO" createUnit [getmarkerpos "Bunker C", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Commander" createUnit [getmarkerpos "Bunker C", _eastgrp, "cmdr = this; this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Lopotev" createUnit [getmarkerpos "Bunker C", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_2" createUnit [getmarkerpos "B11", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_1" createUnit [getmarkerpos "B12", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B13", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		_bunker = createVehicle ["Land_fortified_nest_big", getmarkerpos "B11", [], 1, "NONE"];
		_bunker1 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B12", [], 1, "NONE"];
		_bunker2 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B13", [], 1, "NONE"];
		_bunker3 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B14", [], 1, "NONE"];
		_CommandTent = createVehicle ["Land_tent_east", getmarkerpos "Bunker C", [], 1, "NONE"];
	};

	case 4: {
		"Ins_Soldier_1" createUnit [getmarkerpos "Bunker D", _eastgrp, "this setpos [(getmarkerpos ""B16"" select 0), (getmarkerpos ""B17"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_2" createUnit [getmarkerpos "Bunker D", _eastgrp, "this setpos [(getmarkerpos ""B18"" select 0), (getmarkerpos ""B19"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_AR" createUnit [getmarkerpos "Bunker D", _eastgrp, "this setpos [(getmarkerpos ""B16"" select 0), (getmarkerpos ""B19"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sab" createUnit [getmarkerpos "Bunker D", _eastgrp, "this setpos [(getmarkerpos ""B17"" select 0), (getmarkerpos ""B18"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Bardak" createUnit [getmarkerpos "Bunker D", _eastgrp, "this setpos [(getmarkerpos ""B17"" select 0), (getmarkerpos ""B16"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B16", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B17", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B18", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B19", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sapper" createUnit [getmarkerpos "B16", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_GL" createUnit [getmarkerpos "B17", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_AA" createUnit [getmarkerpos "B18", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_AT" createUnit [getmarkerpos "B19", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_CO" createUnit [getmarkerpos "Bunker D", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Commander" createUnit [getmarkerpos "Bunker D", _eastgrp, "cmdr = this; this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Lopotev" createUnit [getmarkerpos "Bunker D", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_2" createUnit [getmarkerpos "B16", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_1" createUnit [getmarkerpos "B17", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B18", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		_bunker = createVehicle ["Land_fortified_nest_big", getmarkerpos "B19", [], 1, "NONE"];
		_bunker1 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B18", [], 1, "NONE"];
		_bunker2 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B17", [], 1, "NONE"];
		_bunker3 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B16", [], 1, "NONE"];
		_CommandTent = createVehicle ["Land_tent_east", getmarkerpos "Bunker D", [], 1, "NONE"];
	};

	case 5: {
		"Ins_Soldier_1" createUnit [getmarkerpos "Bunker E", _eastgrp, "this setpos [(getmarkerpos ""B21"" select 0), (getmarkerpos ""B22"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_2" createUnit [getmarkerpos "Bunker E", _eastgrp, "this setpos [(getmarkerpos ""B21"" select 0), (getmarkerpos ""B24"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_AR" createUnit [getmarkerpos "Bunker E", _eastgrp, "this setpos [(getmarkerpos ""B23"" select 0), (getmarkerpos ""B22"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sab" createUnit [getmarkerpos "Bunker E", _eastgrp, "this setpos [(getmarkerpos ""B24"" select 0), (getmarkerpos ""B23"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Bardak" createUnit [getmarkerpos "Bunker E", _eastgrp, "this setpos [(getmarkerpos ""B22"" select 0), (getmarkerpos ""B21"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B21", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B22", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B23", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B24", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sapper" createUnit [getmarkerpos "B21", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_GL" createUnit [getmarkerpos "B22", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_AA" createUnit [getmarkerpos "B23", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_AT" createUnit [getmarkerpos "B24", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_CO" createUnit [getmarkerpos "Bunker E", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Commander" createUnit [getmarkerpos "Bunker E", _eastgrp, "cmdr = this; this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Lopotev" createUnit [getmarkerpos "Bunker E", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_2" createUnit [getmarkerpos "B21", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_1" createUnit [getmarkerpos "B22", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B23", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		_bunker = createVehicle ["Land_fortified_nest_big", getmarkerpos "B21", [], 1, "NONE"];
		_bunker1 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B22", [], 1, "NONE"];
		_bunker2 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B23", [], 1, "NONE"];
		_bunker3 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B24", [], 1, "NONE"];
		_CommandTent = createVehicle ["Land_tent_east", getmarkerpos "Bunker E", [], 1, "NONE"];
	};

	case 6: {
		"Ins_Soldier_1" createUnit [getmarkerpos "Bunker F", _eastgrp, "this setpos [(getmarkerpos ""B26"" select 0), (getmarkerpos ""B29"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_2" createUnit [getmarkerpos "Bunker F", _eastgrp, "this setpos [(getmarkerpos ""B27"" select 0), (getmarkerpos ""B28"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_AR" createUnit [getmarkerpos "Bunker F", _eastgrp, "this setpos [(getmarkerpos ""B29"" select 0), (getmarkerpos ""B27"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sab" createUnit [getmarkerpos "Bunker F", _eastgrp, "this setpos [(getmarkerpos ""B26"" select 0), (getmarkerpos ""B28"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Bardak" createUnit [getmarkerpos "Bunker F", _eastgrp, "this setpos [(getmarkerpos ""B27"" select 0), (getmarkerpos ""B29"" select 1)]; this setdir (random 359); this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B26", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B27", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B28", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B29", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sapper" createUnit [getmarkerpos "B26", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_GL" createUnit [getmarkerpos "B27", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_AA" createUnit [getmarkerpos "B28", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_AT" createUnit [getmarkerpos "B29", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_CO" createUnit [getmarkerpos "Bunker F", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Commander" createUnit [getmarkerpos "Bunker F", _eastgrp, "cmdr = this; this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Lopotev" createUnit [getmarkerpos "Bunker F", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_2" createUnit [getmarkerpos "B26", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_1" createUnit [getmarkerpos "B27", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		"Ins_Soldier_Sniper" createUnit [getmarkerpos "B28", _eastgrp, "this addEventHandler [""killed"", {_this select 0 exec ""hide.sqs""}]", 2.0, ""];
		_bunker = createVehicle ["Land_fortified_nest_big", getmarkerpos "B26", [], 1, "NONE"];
		_bunker1 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B27", [], 1, "NONE"];
		_bunker2 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B28", [], 1, "NONE"];
		_bunker3 = createVehicle ["Land_fortified_nest_big", getmarkerpos "B29", [], 1, "NONE"];
		_CommandTent = createVehicle ["Land_tent_east", getmarkerpos "Bunker F", [], 1, "NONE"];
	};
};
};

Having a proper layout is the most important step when it comes to scripting. You were missing a closing bracket }; at the very end.

Also i re-arranged it for sqf synthax like kyliana already suggested.

Edited by [FRL]Myke

Share this post


Link to post
Share on other sites
i don't even goto the store, i moveinshopping there.

Haha, good one. :D

Share this post


Link to post
Share on other sites

Thank you gentlemen for your help. I see your point on mixing .sqs and .sqf files. I did put the last closed "};" bracket in there, it was just at the end of case 6: _Commandtent... line, but anyhow thank you for your help again. Just so I'm clear "goto" is an .sqs command, not an .sqf command. Also another question, I run a dedicated server. So in my .sqs or .sqf files, should I use the (isDedicated) or (isServer)? Thanks again, will be back if I run into more errors.

Share this post


Link to post
Share on other sites

exit is another SQS only command.

isDedicated vs isServer depends on what you need to check for really.

Share this post


Link to post
Share on other sites

Looking at the nature of your script (which is spawning stuff) the correct command would be isServer. In this case it doesn't matter if the game is self hosted or runnin on a dedicated machine, the stuff has to be spawned exactly once and this has to happen on the server machine. So isServer returns true for selfhosted aswell as for dedicated.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×