Glad to help ;D

Anyway I wrote a function to run the slot_on_click callback with the parameters of the item allocated in a certain slot of a bag if exists.

Code:
function inv_run_slot_callback ( Bag *bag, var slot_id )
{
	if ( !on_click_callback_function_ptr )
		return 0;
	
	int i = 0;
	for ( ; i<bag->_slot_count; i++ )
	{
		Slot *slot = bag->slots[i];
		if ( slot->id != slot_id )
			continue;
		Item *item = slot->item;
		if ( !item )
			return 0;
		on_click_callback_function_ptr ( INV_ITEM_PLACED, bag->id, slot->id, item->id, NULL );
		return 1;
	}
	return 0;
}



Call it when your 'player' pointer is properly filled after level loading.
Salud!