Arma 3
Missing ; for every line of code
Sorry if this is probably a really basic question but I cant seem to find anyone else having this issue. I launch my scenario in the Eden editor and keep getting a script error saying "Error missing ;" and then listes the path to the sqf file with line 1 nest to it. The code is below

I checked and I have a ; at the end of every line similar to the example codes I follow, and its not just for line 1 but for every line after that if I delete the first line.

Am I missing something basic?

spawn[];
{
sleep 1;
_base1 = base1[] ;
_positionP = getPos player;

_unitPool11 = ["O_Soldier_SL_F", "O_Soldier_AR_F", "O_Soldier_GL_F", "O_Soldier_F", "O_medic_F"];
_unitPool22 = ["O_Soldier_GL_F", "O_Soldier_F", "O_Soldier_AR_F"];

if (base1 = true)then
{
_positionB1 = getRelPos baseLogic, "base1";
_tospawn = [];
for "_i" from 1 to 5 do
{
// Spawn 5 units
_toSpawn11 pushBack selectRandom _unitPool11;
_toSpawn12 pushBack selectRandom _unitPool22;
};
//g1 suffix means garrison 1
_groupg1 = [_positionB1, EAST, _toSpawn1] call BIS_fnc_spawnGroup;
_groupg2 = [_positionB1, EAST, _toSpawn1] call BIS_fnc_spawnGroup;
//p1 suffix means patrol 1
_groupp1 = [getMarkerPos "base1", EAST, _toSpawn] call BIS_fnc_spawnGroup;

_leaderg1 = leader _groupg1;
_leaderg2 = leader _groupg2;
_leaderp1 = leader _groupp1;
_markerName = "myMarker";
markerCreate1 [_markerName, getPos _leaderg1];
markerCreate2 [_markerName, getPos _leaderg2];
markerCreate3 [_markerName, getPos _leaderp1];
};
sleep 10;
};
< >
Menampilkan 1-2 dari 2 komentar
hey the spawn needs a code before it is closed
//[]spawn{};
//[]spawn
{


};

and what do you have to do with _base1 before? he should spend a boolean? then you have as far as I can see _base1 and base1 should that be the same ?
if you neeb a boolean for your _base1 write it local
_base1 = true;
if(_base1 == true)then{};

Here are all the commands with explanation
https://community.bistudio.com/wiki/Category:Arma_3:_Scripting_Commands

I hope it helped you
Terakhir diedit oleh LEBERWÜRSTCHEN; 1 Jan @ 1:15am
Hello,
Im sorry for the late reply as I have been working on getting this piece of code working as I want it to. Thank you for explaining to me for answering my very nooby question. For reference this is what the code looks like now and I tested it to make sure it works. I will now continue to expand it to be the scenario I want it to be

[] spawn
{
sleep 1;
game = true;
_positionP = getPos player;
_base1 = "base1";
_positionb1 = getPos base1;
_base1marker = createMarker ["base1", _positionb1];
_base1marker setMarkerType "o_hq";
//group deleteGroupWhenEmpty delete;

_unitPool11 = ["O_Soldier_SL_F", "O_Soldier_AR_F", "O_Soldier_GL_F", "O_Soldier_F", "O_medic_F"];
_unitPool22 = ["O_Soldier_GL_F", "O_Soldier_F", "O_Soldier_AR_F"];

//_tospawn = [];
//for "_i" from 1 to 5 do
//{
// Spawn 5 units
//_toSpawn11 pushBack selectRandom _unitPool11;
//_toSpawn12 pushBack selectRandom _unitPool22;
//};
//g1 suffix means garrison 1
_groupg1 = [_positionb1, EAST, 4] call BIS_fnc_spawnGroup;
_groupg1 move position player;
//p1 suffix means patrol 1

while {true} do {

_leaderg1 = getPos leader _groupg1;
_g1marker = createMarker ["g1", _leaderg1];
while {true} do {

_g1marker setMarkerType "o_inf";

if (!alive leader _groupg1) then {

deleteMarker _g1marker;
}
else {
_g1marker setMarkerPos (getPos leader _groupg1);
sleep 2;
};
};
};
};
sleep 3;
< >
Menampilkan 1-2 dari 2 komentar
Per halaman: 1530 50