Jump to content

Recommended Posts

I am getting this message in my .rpt and I'm stumped. The mission won't finish loading because of it. I'll post the error but I don't what if anything else is needed to find the answer. I am hoping it's just a typo.

.rpt message =

 

 

20:40:45 Error in expression <count _chars) - 1) do
{
_item = _chars select _ia;

if (isClass _item) then
{
>
20:40:45   Error position: <select _ia;

if (isClass _item) then
{
>
20:40:45   Error Generic error in expression

 

Here is the same lines from the mission file

my file=

 

    for "_ia" from 0 to ((count _chars) - 1) do
        {
        _item = _chars select _ia;
        
        if (isClass _item) then
            {
            _types set [(count _types),getText(_item >> "vehicle")];
            _ranks set [(count _ranks),getText(_item >> "rank")];
            
            if (_ia > 0) then
                {
                _safePos = [_pos,0,160,10,0,4,0] call BIS_fnc_findSafePos;
                _rP = [(_safePos select 0) - (_pos select 0),(_safePos select 1) - (_pos select 1),0.5];
                _positions pushBack _rP
                }
            };
        };

 

Thanks for helping

 

 

Share this post


Link to post
Share on other sites

Is _chars an array? Obviously it's intended to be, but it might be worth systemChat-ing it to see what it comes out as. I think a non-array used with select will give that error.

Share this post


Link to post
Share on other sites

isClass is waiting for a config like: configFile >> "CfgVehicles" , not a config class like "B_APC_Tracked_01_rcws_F",

(First format is a config, second one is a string).

If _chars is an array of vehicle classes (so strings), try:

isClass (configFile >> "cfgVehicles" >> _item)

 

That's for the principle. On the other hand, I don't know where you are going to with "vehicle" and "rank"... You need to refer to some existing token, like "vehicleClass" or "displayName", "hiddenSelections".... as listed in config viewer.

 

 

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

×