set myItem = null
set udg_BuyerItemHeld[GetConvertedPlayerId(udg_Temp_Player)] = null
set udg_BuyerItemHeld[GetConvertedPlayerId(udg_Temp_Player)] = GetItemTypeID(null)
you said udg_temp_player is a unit variable? was that a typo? if not thats your problem because a player should be a player variable...
Create new item, set it to new item, remove new item?
you said udg_temp_player is a unit variable? was that a typo? if not thats your problem because a player should be a player variable...
you dont have to set the array size for item arrays also because it wouldnt make a difference.
you actually dont have to set item variables to null also, in case you think it would leak.
and you can null them with simple GUI as well cause there is an option to set the variable to "no item".
set udg_ItemVariableThingy = null