Hi, wonder if you could help me understand this error I am getting.

Added by Woodstock about 6 years ago

Hi, firstly I'd like to say how much I have enjoyed playing your mod. I have read that in the road map you are planning on converting to additional maps! Great stuff!

Now to my problem:

I am running v. 1.17b of the ACE version of the WACO mod.

I have added some new recruitable units to the barracks by modifying the barracks config file. I did this in 1.17 and it all worked fine. When I added them in to 1.17b I now get an error report.

The error report appears as soon as the first barracks is built and repeats every so often. The error doesn't crash the game or anything, it seems to still be perfectly playable. The units I added can be recruited fine and they work perfectly. It seems as though increasing the number of recruitable units at the barracks now messes with some script?. If I play 1.17b unmoddified I do not get the error, I'd just like to be able to recruit some custom units of my own.

From arma.rpt

Error in expression < = unitsToBuy + [_indexedTemplateUnits Select _count];
};
};
_count = _count + >
Error position: <Select _count];
};
};
_count = _count + >
Error Zero divisor
File mpmissions\
_cur_mp.SaraLite\Server\Functions\Server_ComposePurchaseOrder.sqf, line 41

Many thanks for your help and keep up the great work!


Replies (6)

RE: Hi, wonder if you could help me understand this error I am getting. - Added by Doomguy about 6 years ago

Hi Woodstock,

Could you post the modified Config_Barracks?

Doomguy

RE: Hi, wonder if you could help me understand this error I am getting. - Added by Woodstock about 6 years ago

Hi sure. This is the part I added. You can see the last standard unit at the top, I just added my units on to the end.

_v = _v + ["WHMGABSOLDIER"]
_u = _u + ["ACE_SoldierW_HMGAB"]
_d = _d + ["M2HB Ammo Bearer"]
_c = _c + [125]
_t = _t + [6]
_p = _p + [6]
_i = _i + ["\Ca\characters\data\Ico\i_null_CA.paa"]

_v = _v + ["WUKSFOPERATOR"]
_u = _u + ["BRITSF2"]
_d = _d + ["UKSF Assault Team, Operator"]
_c = _c + [200]
_t = _t + [8]
_p = _p + [10]
_i = _i + ["\Ca\characters\data\map_ico\i_komandos_CA.paa"]

_v = _v + ["WUKSFDEMO"]
_u = _u + ["BRITSF3"]
_d = _d + ["UKSF Assault Team, Demolitions"]
_c = _c + [200]
_t = _t + [8]
_p = _p + [10]
_i = _i + ["\Ca\characters\data\map_ico\i_komandos_CA.paa"]

_v = _v + ["WUKSFGRENADIER"]
_u = _u + ["BRITSF1"]
_d = _d + ["UKSF Assault Team, Grenadier"]
_c = _c + [200]
_t = _t + [8]
_p = _p + [10]
_i = _i + ["\Ca\characters\data\map_ico\i_komandos_CA.paa"]

_v = _v + ["WUKSFAUTORIFLE"]
_u = _u + ["BRITSF5"]
_d = _d + ["UKSF Assault Team, Automatic Rifleman"]
_c = _c + [200]
_t = _t + [8]
_p = _p + [10]
_i = _i + ["\Ca\characters\data\map_ico\i_komandos_CA.paa"]

_v = _v + ["WUKSFMEDIC"]
_u = _u + ["BRITSF6"]
_d = _d + ["UKSF Assault Team, Medic"]
_c = _c + [200]
_t = _t + [8]
_p = _p + [10]
_i = _i + ["\Ca\characters\data\map_ico\i_komandos_CA.paa"]

_v = _v + ["WUKSFRECOP"]
_u = _u + ["BRITSF7"]
_d = _d + ["UKSF Recon Team, Operator"]
_c = _c + [200]
_t = _t + [8]
_p = _p + [10]
_i = _i + ["\Ca\characters\data\map_ico\i_komandos_CA.paa"]

_v = _v + ["WUKSFRECSPOTTER"]
_u = _u + ["BRITSF8"]
_d = _d + ["UKSF Recon Team, Spotter"]
_c = _c + [200]
_t = _t + [8]
_p = _p + [10]
_i = _i + ["\Ca\characters\data\map_ico\i_komandos_CA.paa"]

_v = _v + ["WUKSFRECDEMO"]
_u = _u + ["BRITSF9"]
_d = _d + ["UKSF Recon Team, Demolitions"]
_c = _c + [200]
_t = _t + [8]
_p = _p + [10]
_i = _i + ["\Ca\characters\data\map_ico\i_komandos_CA.paa"]

_v = _v + ["WUKSFRECGRENADIER"]
_u = _u + ["BRITSF10"]
_d = _d + ["UKSF Recon Team, Grenadier"]
_c = _c + [200]
_t = _t + [8]
_p = _p + [10]
_i = _i + ["\Ca\characters\data\map_ico\i_komandos_CA.paa"]

_v = _v + ["WUKSFRECMEDIC"]
_u = _u + ["BRITSF11"]
_d = _d + ["UKSF Recon Team, Medic"]
_c = _c + [200]
_t = _t + [8]
_p = _p + [10]
_i = _i + ["\Ca\characters\data\map_ico\i_komandos_CA.paa"]

_v = _v + ["WUKSFRECLIGHTRIFLE"]
_u = _u + ["BRITSF12"]
_d = _d + ["UKSF Recon Team, Light Rifleman"]
_c = _c + [200]
_t = _t + [8]
_p = _p + [10]
_i = _i + ["\Ca\characters\data\map_ico\i_komandos_CA.paa"]

for [{_count = Count _u - 1},{_count >= 0},{_count = _count - 1}] do {Call Compile Format["%1TYPE = %2;%1 = ""%3""",_v Select _count,_count,_u Select _count];}

RE: Hi, wonder if you could help me understand this error I am getting. - Added by Doomguy about 6 years ago

Hmm, that seems fine. Are you sure you didn't also change Common\Config\Config_AITeams.sqs ?

RE: Hi, wonder if you could help me understand this error I am getting. - Added by Woodstock about 6 years ago

No I haven't touched that file. It's really strange, I've tried a variety of things to fix it and it doesn't make any difference. There are 2 spec op guys at the barracks as standard, sniper and demo. A symptom of the error seems to be that the AI recruits the standard specop sniper then disbands him, the base camp has at least one of their corpses lying around at any given time. I also see live ones though so it's not disbanding them all. The AI doesn't seem to recruit the standard spec op Demo guy at all which it does in the unmodified version.

RE: Hi, wonder if you could help me understand this error I am getting. - Added by Doomguy about 6 years ago

Hi Woodstock,

Could you send me your complete Config_Barracks.sqs? I'll paste it into my directory here and see what happens.

Doomguy

RE: Hi, wonder if you could help me understand this error I am getting. - Added by Woodstock about 6 years ago

Sure. Thanks for helping.

/edit: Sorry pasted wrong one. Corrected now, it's the second one. You'll need the British Special Forces units mod for it to work http://www.armaholic.com/page.php?id=5066

/edit2: I finally re-downloaded the mission and it's all working fine. I must have either messed up during the installation or simply had a corrupted download as it is all working fine now. Thanks again for taking the time to look at it anyway.

Config_Barracks.sqs - Config_Barracks (16.6 kB)

Config_Barracks.sqs (14.9 kB)

(1-6/6)