View Single Post
02/26/23, 09:54 AM   #6
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 245
Originally Posted by ExoY View Post
you dont use your table in that line anyway. You use the respective entry your loop is currently looking at.
So I dont know what you mean with that comment.

Also looks like you forgot to define the gemIndex locally. This can cause issues.

Also for troubleshooting, just use the function in quesiton (here: ChargeItemWithSoulGem) manually with script lines in chat.
That makes it easier to pin point the problem
Code:
function RidinDirty.GetGems()
	for slotId = 0, GetBagSize(BAG_BACKPACK) do
		if IsItemSoulGem(SOUL_GEM_TYPE_FILLED, BAG_BACKPACK, slotId) then
			gemId = slotId
			df("found gems %s", gemId) -- <<<<<< returning 0 to chat as well which makes no sense to me.. it should be the slot# i would think
			return gemId
		end
        end
end

Last edited by sinnereso : 02/26/23 at 10:18 AM.
  Reply With Quote