Jump to content

Recommended Posts

Hey Everyone,

 

Having some issues with this bit of code it says "generic error in expression" and I can't figure out whats up with it.

 

params [
    ["_player", [], [[]]]
];

private _return = false;

{
    if ((Lobby_slottedPlayers getVariable _x select 1) isEqualTo (_player select 1)) then {
        Lobby_slottedPlayers setVariable [_x, nil, true];
        missionNamespace setVariable ["Lobby_updateSlots", true, true];
    };
} forEach allVariables Lobby_slottedPlayers;

_return

 

Anyone able to help with this? im baffled.

Share this post


Link to post
Share on other sites

You are not only getting a "generic error in expression" your RPT also tells you the real error that you have.

Do you maybe mean "(Lobby_slottedPlayers getVariable _x) select 1" instead of "Lobby_slottedPlayers getVariable _x select 1"? _x is a string. and STRING select 1 won't work.

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

×