Inventory item pick up through raycast

Godot Version

4.3

Question

How do I call a function in process with variable parameter?

I new and in not really sure if the question is even making sense. My brain absolutely refuses to comprehend how these data and parameters work. I was fallowing this particular video [https://www.youtube.com/watch?v=4vAkTHeoORk&t=1206s] on creation of inventory. Set up is almost identical, except in video author use area and signals to determine if the item is picked up, which also changes a set up a bit. I was trying to do so though raycast3d since I think its more convenient that way and that’s the way I wish the interaction system to work anyway.

Problem is, function does not work by it self and has to be called though process, unlike in video where it does not, only because he uses area3d instead and its self contained signal, and also I assume because this is how raycast3d work, but since I have a set parameter of item, it throws an error, as depicted in image below, which is a script attached to a raycast3d, in which I wish to have an inventory in. Is there a way to call it? or how do I set this up so it works?, or is this not the way to approach it?

This is my set up for an item. In his script, variable item is present, which allows me to add this function [inventory._add_item(item)] and add item to inventory, but it wont make sense since item than deleted.