Member “length” not found or not visible after argument-dependent lookup in uint256

This is my Smart contract:
`// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;

contract BankAccount {
event Deposit(
address indexed user,
uint indexed accountId,
uint value,
uint timestamp
);
event WithdrawRequested(
address indexed user,
uint indexed accountId,
uint indexed withdrawId,
uint amout,
uint timestamp
);
event Withdraw(uint indexed withdrawId, uint timestamp);
event AccountCreated(address[] owners, uint indexed id, uint timestamp);

struct WithdrawRequest {
    address user; // who request the withdraw
    address amount;
    uint approvals; // check to determine if the the withdraw is approved
    mapping(address => bool) ownerApproved;
    bool approved;
}

struct Account {
    address[] owners;
    uint balance;
    mapping(uint => WithdrawRequest) withdrawRequests; // uint is going to be the id of the withdraw request
}


mapping(uint => Account) accounts;
mapping(address => uint) userAccounts; // store the accounts that the users own

uint nextAccountId; // every time we create an account we increment the id
uint nextWithdrawId; // every time we request a withdraw we increment the id

modifier accountOwnership(uint accountId) {

    bool isOwner;
    for (uint idx; idx < accounts[accountId].owners.length; idx++) {
        if (accounts[accountId].owners[idx] == msg.sender) {
        isOwner = true;
        break;
        }
    }
    require(isOwner, "You are not the Owner");
    _;
}

function deposit(uint accountId) external payable accountOwnership(accountId) {

    accounts[accountId].balance += msg.value;
}


modifier validOwner(address[] calldata owners) {
    require(owners.length <= 4, "Max is 4 owners per account");

    for (uint i ; i < owners.length ; i++) {
        for (uint j = i + 1 ; j < owners.length; j++) {
            if (owners[i] == owners[j]) {
                revert("No Duplicate Owners");
            }
        }
    }
    
    _;
}

function createAccount(address[] calldata otherOwners) external  validOwner(otherOwners){
    address[] memory owners = new address[](otherOwners.length + 1);
    owners[otherOwners.length] = msg.sender;

    uint id = nextAccountId;

    // this for loop just check if each user had max 3 account 
    // if not the are allowed to create one, if yes we will revert the operation
    for (uint idx ; idx < owners.length; idx++) {
        if (idx < owners.length - 1) {
            owners[idx] = otherOwners[idx];
        }

        if (userAccounts[owners[idx]].length >= 3) {
            revert("Each User has 3 account max");
        }
        userAccounts[owners[idx]].push(id);
    }
    accounts[id].owners = owners;
    nextAccountId++;
    emit AccountCreated(owners, id, block.timestamp);
}

modifier sufficientBalance(uint accountId, uint amount) {
    require(accounts[accountId].balance >= amount, "Not enough Balance");
    _;
}

function requestWithdraw(uint accountId, uint amount) external accountOwnership(accountId) sufficientBalance(accountId, amount){
    uint id = nextWithdrawId;
    WithdrawRequest storage request = accounts[accountId].withdrawRequests[id];
    request.user = msg.sender;
    request.amount = amount;
    nextWithdrawId++;
    emit WithdrawRequested(msg.sender, accountId, id, amount, block.timestamp);
}

modifier canApprove(uint accountId, uint withdrawId) {
    require(!accounts[accountId].withdrawRequests[withdrawId].approved, "This is already approved");
    require(accounts[accountId].withdrawRequests[withdrawId].user != msg.sender, "You are the user , can't approved");
    require(accounts[accountId].withdrawRequests[withdrawId].user != address(0), "this request doesn't exist");
    require(!accounts[accountId].withdrawRequests[withdrawId].ownerApproved[msg.sender], "you are already aproved");
    _;
}

function approveWithdraw(uint accountId, uint withdrawId) external accountOwnership(accountId) canApprove(accountId, withdrawId) {
    WithdrawRequest storage request = accounts[accountId].withdrawRequests[withdrawId];
    request.approvals++;
    request.ownerApproved[msg.sender] = true;

    if (request.approvals == accounts[accountId].owners.length - 1) {
        request.approved = true;
    }
}


modifier withdrawOwnership(uint accountId, uint withdrawId) {
    require(accounts[accountId].withdrawRequests[withdrawId].user ==msg.sender, "You are not the owner of the request");
    require(accounts[accountId].withdrawRequests[withdrawId].approved, "This request is not aproved");
    _;
}


function withdraw(uint accountId, uint withdrawId) external withdrawOwnership(accountId, withdrawId) {
    uint amount = accounts[accountId].withdrawRequests[withdrawId].amount;
    require(accounts[accountId].balance >= amount, "not enough money");

    accounts[accountId].balance -= amount;
    delete accounts[accountId].withdrawRequests[withdrawId];
    (bool sent, ) = payable(msg.sender).call{value : amount}("");
    require(sent);

    emit Withdraw(withdrawId, block.timestamp);
}

function getBalance(uint accountId) public view returns(uint) {
    return accounts[accountId].balance;
}

function getOwners(uint accountId) public view returns(address[] memory) {
    return accounts[accountId].owners;
}

function getApprovals(uint accountId, uint withdrawId) public view returns (uint) {
    accounts[accountId].withdrawRequests[withdrawId].approvals;
}


function getAccounts() public view returns(uint[] memory) {
    return userAccounts[msg.sender];
}

}
`
, when i test it it shows me this error:
Member “length” not found or not visible after argument-dependent lookup in uint256.

Checking if user has 3 accounts already

New contributor

Mohamed is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật