'Having trouble with getting an item in the game I am writing

Im writing this game for class in Python and I've gotten all the movement commands to work but I for the life of me cannot get the "get item" command to work. Any help would be appreciated.

    def main_menu():
    # Intro and directions inviting player to game
    print("Viking Adventure game")
    print("You were tasked to collect the items in an abandoned storehouse.")
    print("Collect them all or be felled by the Dragur")
    print("Move commands: Go North, Go South, Go East, Go West")
    print("Add to Inventory: Get 'item name'")


    def move_between_rooms(current_room, move, rooms):
    # defining movement commands
    current_room = rooms[current_room][move]
    return current_room


def get_item(current_room, rooms, inventory):
    # Inventory controls
    inventory.append(rooms[current_room]['item'])
    del rooms[current_room]['item']


def main():
    # the dictionary defining the available directions and items
    rooms = {
        'Entrance': {'East': "Main Hall"},
        'Main Hall': {'South': "Smithy", 'East': "Workshop", 'North': "Armory", 'West': "Entrance",
                      'item': "Old Key"},
        'Smithy': {'North': "Main Hall", 'East': "Metal Storage", 'item': "Sword"},
        'Metal Storage': {'West': "Smithy", 'item': "Iron Ore"},
        'Workshop': {'West': "Main Hall", 'North': "Storage", 'item': "Tools"},
        'Storage': {'South': "Workshop", 'item': "Lumber"},
        'Armory': {'South': "Main Hall", 'East': "Barracks", 'item': "Shield"},
        'Barracks': {'West': "Armory", 'item': "Lumber"},
    }

    inventory = []

    current_room = "Entrance"

    main_menu()

    while True:
        # handle the interaction with the dragur
        if current_room == 'Barracks':
            # winning case
            if len(inventory) == 6:
                print("Congratulations you have escaped the Dragur's wrath!")
                print('FOR NOW')
                print('Return home and let the village know of your accomplishment')
                print('Thank you for playing!')
                break
            # losing case
            else:
                print('\nTry as you might you are unable to fell the dragur.')
                print('You have failed in your task. Perhaps more items would help')
                print('Thank you for playing!')
                break

        # Tell the user their current room, inventory and prompt for a move, ignores case
        print('You are in the ' + current_room)
        print(inventory)
        # tell the user if there is an item in the room
        if current_room != 'Barracks' and 'item' in rooms[current_room].keys():
            print('You see the {}'.format(rooms[current_room]['item']))
        print('------------------------------')
        move = input('Enter your move: ').title().split()

        # handle if the user enters a command to move to a new room
        if len(move) >= 2 and move[1] in rooms[current_room].keys():
            current_room = move_between_rooms(current_room, move[1], rooms)
            continue
        # handle if the user enter a command to get an item
        elif len(move[0]) == 3 and move[0] == 'Get' and ' '.join(move[1:]) in rooms[current_room]['item']:
            print('You pick up the {}'.format(rooms[current_room]['item']))
            print('------------------------------')
            get_item(current_room, move, rooms, inventory)
            continue
        # handle if the user enters an invalid command
        else:
            print('Invalid move, please try again')
            continue


main()

The error message is this but I do not know how to solve the issue line 78, in main get_item(current_room, move, rooms, inventory) TypeError: get_item() takes 3 positional arguments but 4 were given



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source