I have been working on a AI creator script for my clans training map. So far I have managed to get all the error messages that show up in game out of the script except for this last one,
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Error in expression <g">
Error position: <">
Error Missing;[/QUOTE]
Now I tink the error is some where in the creatunit area cause it happens multiple times.
This is the script,
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">//REGION RUNCODE
////////////////////////////////////////////////////////
//Runcode: var = [Groupleader,Amountofinfantry,Amountofvehicles ,Amountofarmour,AmountofAirunits,Geartype,
Unitside] execVM "AIcreator.sqf"
//Geartypes: 1=West, 2=East
//Sides: 1=West, 2=East, 3=Guerilla, 4=Civilian
////////////////////////////////////////////////////////
//ENDREGION
//REGION Data gathering
_Unit = _this select 0;
_InfS = _this select 1;
_VecS = _this select 2;
_ArmS = _this select 3;
_AirS = _this select 4;
_Geartype = _this select 5;
_Unittype = _this select 6;
_Group = group _Unit;
//ENDREGION
//REGION Unit lists
_InfW = ["SoldierWSaboteurPipe2","SoldierW AA","SoldierWAT","SoldierWAR", "SoldierWCrew","SoldierWMiner", 4;SoldierWG","SoldierWMG","Soldier WB","SoldierWPilot","OfficerW" ,"SoldierWMedic","SoldierWSaboteurAssa ult","SoldierWSaboteurMarksman","& #34;,"SoldierWSaboteurRecon","SoldierW SaboteurPipe","TeamLeaderW","Squad LeaderW","SoldierWSniper"];
_VecW = ["Truck5tOpen","Truck5tMG", 4;HMMWV","HMMWV50","HMMWVMK",& #34;Truck5t","HMMWVTOW","M1030" ;,"m113ambul","Truck5tRepair"," ;Truck5tRefuel","Truck5tReammo"];
_ArmW = ["M113","Vulcan","M1Abrams ","Stryker_TOW","Stryker_ICV_M2 4;,"Stryker_ICV_MK19"];
_AirW = ["UH60","Camel","MH6", "UH60MG","AV8B","AV8B2",&# 34;AH6","AH1W","A10"];
_InfE = ["SoldierEAA","SoldierEAT", 4;SoldierECrew","SoldierEMiner","S oldierEMG","SoldierEG","SoldierESn iper","SoldierEB","SoldierEPilot&# 34;,"SoldierESaboteurMarksman","Office rE","SoldierESaboteurBizon","Soldi erESaboteurPipe","SoldierEMedic"," SquadLeaderE","TeamLeaderE"];
_VecE = ["UAZ","UralReammo","UralR efuel","Ural","UAZMG","Ura lOpen","UAZ_AGS30","UralRepair" ;,"TT650G","bmp2ambul"];
_ArmE = ["T72","BMP2","BRDM2", "BRDM2_ATGM","ZSU"];
_AirE = ["KA50","Mi17_MG","Mi17 4;,"Su34B","Su34","Camel2" ];
_InfG = ["SoldierGAA","SoldierGAT", 4;SoldierGCrew","SoldierGMiner","S oldierGGuard","SoldierGCommando"," SquadLeaderG","TeamLeaderG","Soldi erGB","SoldierGMG","SoldierGMedic& #34;,"OfficerG","SoldierGSniper",& #34;SoldierGPilot","SoldierGG","So ldierGMarksman"];
_VecG = ["Landrover_Closed","LandroverMG&# 34;,"Landrover"];
_ArmG = ["Vulcan_RACS","M113_RACS", 4;T72_RACS"];
_AirG = ["AH6_RACS","MH6_RACS"] ;
_InfC = ["Civilian","Civilian10"," Civilian11","Civilian12","Civilian 20","Civilian14","Civilian15", "Civilian19","Civilian2","Civi lian13","Civilian21","Civilian9 4;,"Civilian8","Civilian7","Ci vilian6","Civilian5","Civilian18&# 34;,"Civilian17","Civilian16"," ;Civilian3","Civilian4"];
_VecC = ["SkodaGreen","Skoda","Ura lCivil","Bus_city","SkodaBlue" ,"SkodaRed","datsun1_civil_1_open" ,"hilux1_civil_3_open","hilux1_civil_2 _covered","hilux1_civil_1_open","c ar_hatchback","UralCivil2","TT650C ","datsun1_civil_3_open","datsun1_ civil_2_covered","car_sedan","trac tor"];
_ArmC = [];
_AirC = [];
//ENDREGION
//REGION Unit creation
switch (_Unittype) do {
//REGION West
case 1:
{
while {_I < _InfS} do
{
_I=_I+1;
_IA = count _InfW;
_IN = random _IA;
_IN = round _IN;
_IUnit = _InfW select _IN;
("_IUnit" createUnit [position _Unit, _Group]);
};
while {_V < _VecS} do
{
_V=_V+1;
_VA = count _VecW;
_VN = random _VA;
_VN = round _VN;
_VUnit = _VecW select _VN;
("_VUnit" createUnit [position _Unit, _Group]);
};
while {_R < _ArmS} do
{
_R=_R+1;
_RA = count _ArmW;
_RN = random _RA;
_RN = round _RN;
_RUnit = _ArmW select _RN;
("_RUnit" createUnit [position _Unit, _Group]);
};
while {_A < _AirS} do
{
_A=_A+1;
_AA = count _AirW;
_AN = random _AA;
_AN = round _AN;
_AUnit = _AirW select _AN;
("_AUnit" createUnit [position _Unit, _Group]);
};
};
//ENDREGION
//REGION East
case 2:
{
while {_I < _InfS} do
{
_I=_I+1;
_IA = count _InfE;
_IN = random _IA;
_IN = round _IN;
_IUnit = _InfE select _IN;
("_IUnit" createUnit [position _Unit, _Group]);
};
while {_V < _VecS} do
{
_V=_V+1;
_VA = count _VecE;
_VN = random _VA;
_VN = round _VN;
_VUnit = _VecE select _VN;
("_VUnit" createUnit [position _Unit, _Group]);
};
while {_R < _ArmS} do
{
_R=_R+1;
_RA = count _ArmE;
_RN = random _RA;
_RN = round _RN;
_RUnit = _ArmE select _RN;
("_RUnit" createUnit [position _Unit, _Group]);
};
while {_A < _AirS} do
{
_A=_A+1;
_AA = count _AirE;
_AN = random _AA;
_AN = round _AN;
_AUnit = _AirE select _AN;
("_AUnit" createUnit [position _Unit, _Group]);
};
};
//ENDREGION
//REGION Guerilla
case 3:
{
while {_I < _InfS} do
{
_I=_I+1;
_IA = count _InfG;
_IN = random _IA;
_IN = round _IN;
_IUnit = _InfG select _IN;
("_IUnit" createUnit [position _Unit, _Group]);
};
while {_V < _VecS} do
{
_V=_V+1;
_VA = count _VecG;
_VN = random _VA;
_VN = round _VN;
_VUnit = _VecG select _VN;
("_VUnit" createUnit [position _Unit, _Group]);
};
while {_R < _ArmS} do
{
_R=_R+1;
_RA = count _ArmG;
_RN = random _RA;
_RN = round _RN;
_RUnit = _ArmG select _RN;
("_RUnit" createUnit [position _Unit, _Group]);
};
while {_A < _AirS} do
{
_A=_A+1;
_AA = count _AirG;
_AN = random _AA;
_AN = round _AN;
_AUnit = _AirG select _AN;
("_AUnit" createUnit [position _Unit, _Group]);
};
};
//ENDREGION
//REGION Civilian
case 4:
{
while {_I < _InfS} do
{
_I=_I+1;
_IA = count _InfC;
_IN = random _IA;
_IN = round _IN;
_IUnit = _InfC select _IN;
("_IUnit" createUnit [position _Unit, _Group]);
};
while {_V < _VecS} do
{
_V=_V+1;
_VA = count _VecC;
_VN = random _VA;
_VN = round _VN;
_VUnit = _VecC select _VN;
("_VUnit" createUnit [position _Unit, _Group]);
};
while {_R < _ArmS} do
{
_R=_R+1;
_RA = count _ArmC;
_RN = random _RA;
_RN = round _RN;
_RUnit = _ArmC select _RN;
("_RUnit" createUnit [position _Unit, _Group]);
};
while {_A < _AirS} do
{
_A=_A+1;
_AA = count _AirC;
_AN = random _AA;
_AN = round _AN;
_AUnit = _AirC select _AN;
("_AUnit" createUnit [position _Unit, _Group]);
};
};
//ENDREGION
};
//ENDREGION
//REGION GEAR
switch (_Geartype) do{
case 1:
{
[_Unit,1,10] execVM "gear\Gearsquad.sqf";
};
case 2:
{
[_Unit,2,10] execVM "gear\Gearsquad.sqf";
};
};
//ENDREGION
//REGION Exit
exitWith;
//ENDREGION[/QUOTE]
Does anyone have a clue what is wrong with this script?
The Unknown
HOME
Reply With Quote
