function addItemToChar (iChar, iItem)
  local char = getObject("Characters[" .. iChar .. "]")
  local items = char:getLinks(VCharacterItems)
  local gameItem = getObject("Game.GameItems[" .. iItem.. "]")
  table.insert(items, gameItem)
  -- debugging
  for i = 1, table.maxn(items) do
    print('item ' .. i .. ': ')
    print(items[i])
  end
  char:setValue(VCharacterItems, items)
end