Engine saying weapon isn't equipped when it is...

I run this during my battle script and it's giving me false

Code:
console.log($gameParty.isAnyMemberEquipped($dataWeapons[weaponId]));

the weaponID variable is set to 6 and I make sure that the weapon is equipped during the battle test, yet it still returns false.

I decided to do a deeper dive and look into the actors equips by printing the actor object to the console as a JSON object and got this:

Code:
{
    "_equips": [
        {
            "_etypeId": 1,
            "_item": {
                "_dataClass": "",
                "_itemId": 0
            }
        }
    ],
    "_hp": 4867,
    "_mp": 1070,
    "_tp": 23,
    "_hidden": false,
    "_paramPlus": [
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
    ],
    "_states": [],
    "_stateTurns": {},
    "_stateSteps": {},
    "_buffs": [
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
    ],
    "_buffTurns": [
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
    ],
    "_cooldownTurns": {
        "1": -1,
        "2": -1,
        "16": 0,
        "21": 0
    },
    "_warmupTurns": {
        "1": -1,
        "2": -1,
        "16": -1,
        "21": -1
    },
    "_actions": [],
    "_speed": 438,
    "_result": {
        "used": false,
        "missed": false,
        "evaded": false,
        "physical": false,
        "drain": false,
        "critical": false,
        "success": false,
        "hpAffected": false,
        "hpDamage": 0,
        "mpDamage": 0,
        "tpDamage": 0,
        "addedStates": [],
        "removedStates": [],
        "addedBuffs": [],
        "addedDebuffs": [],
        "removedBuffs": [],
        "guarded": false,
        "elementRate": 1,
        "newAddedStates": []
    },
    "_actionState": "acting",
    "_lastTargetIndex": 0,
    "_animations": [],
    "_damagePopup": [],
    "_effectType": null,
    "_motionType": null,
    "_weaponImageId": 0,
    "_motionRefresh": false,
    "_selected": false,
    "_actorId": 1,
    "_name": "Roy",
    "_nickname": "",
    "_classId": 1,
    "_level": 99,
    "_characterName": "roy",
    "_characterIndex": 0,
    "_faceName": "Roy",
    "_faceIndex": 0,
    "_battlerName": "roy_sv",
    "_exp": {
        "1": 2547133
    },
    "_skills": [],
    "_actionInputIndex": 0,
    "_lastMenuSkill": {
        "_dataClass": "",
        "_itemId": 0
    },
    "_lastBattleSkill": {
        "_dataClass": "skill",
        "_itemId": 1
    },
    "_lastCommandSymbol": "",
    "_profile": "",
    "_battleSkills": [
        0,
        0,
        0,
        0,
        0
    ],
    "_checkPassiveStateCondition": [],
    "_passiveStatesRaw": [],
    "_battleSkillMaxPlus": 0,
    "_anchorY": 1,
    "_replaceAttackSkillId": 0,
    "_replaceGuardSkillId": 0,
    "_cooldownTickRate": {},
    "_freeStateTurn": [],
    "_immortalState": false,
    "_selfTurnCount": 1,
    "_flinched": false,
    "_statusRefreshRequested": false
}

It seems as though the weapon id is 0 when its equipped and I can't figure out why this is happening...
Can you post the code of isAnyMemberEquipped?

Also, when are you exactly calling it?
Can you post the code of isAnyMemberEquipped?
Not sure what you're asking for here...

Also, when are you exactly calling it?
It is being called during battle after each turn.

Original thread: https://forums.rpgmakerweb.com/threads/engine-saying-weapon-isnt-equipped-when-it-is.111384/