It seems to me that you're writing a charScript (using info on the Wiki). Norbyte's response was a Story script call, which for the most part are separate from charScripts. A list of Story Editor functions can be found here:
http://www.larian.com/forums/ubbthreads.php?ubb=showflat&Number=531151#Post531151As for your question, the reason why CharacterAddToInventory isn't working is because that command attempts to add a completely new item to the inventory, rather than transferring the item that you have found already. Looking through the charScript functions, I don't think charScripts alone can do what you want. You will probably want to involve a Story script as well.
In your charScript, you could have something like this:
CharacterItemEvent (__Me, _item, "PhaseItemToInventory")
With _item being the item nearby that you have iterated to find.
Then in the Story Editor, you could make a Story script like so:
IF
CharacterItemEvent(_Char, _item, "PhaseItemToInventory")
THEN
ItemToCharacter(_item, _Char);
(If CharacterItemEvent in the Story is indeed an Event that can be responded to. I can't recall at the moment; if it's not then it should be one of the related functions)