Getting an error for a line not even in use?

--change names

local ItemMod = RegisterMod("DesolatedHoodie", 1) local game = Game()

local ITEM = Isaac.GetItemIdByName("Desolated Hoodie") local itemid = ITEM

local hasitem = false

--change these numbers depending on what stats you want local itembonus = { SHOTSPEEDSTAT = 0, DAMAGESTAT = 2, SPEEDSTAT = 0, FIREDELAYSTAT = 0, TEARHEIGHTSTAT = 0, TEARFALLINGSPEEDSTAT = 0, SPEEDSTAT, 0, LUCKSTAT = 0 }

local spawnertrigger = 2

local function UpdateItems(player) HasItem.DesolatedHoodie = player:HasCollectible(itemid.ITEM) end

function ItemMod:onPlayerInit(player) UpdateItems(player) end

ItemMod:AddCallback(ModCallbacks.MC_POST_PLAYER_INIT, ItemMod.onPlayerInit)

--spawner function ItemMod:onUpdate(player) if spawnertrigger == 2 then if game:GetFrameCount() == 1 then Isaac.Spawn(EntityType.ENTITY_PICKUP, PickupVariant.PICKUP_COLLECTIBLE, DesolatedHoodie.COLLECTIBLE_DESOLATED_HOODIE, Vector(320, 300), Vector(0, 0), nil) if player:GetName() == "Isaac" then player.AddCollectible(itemid.ITEM, 0, true) end end

UpdateItems(player)

end

ItemMod:AddCallback(ModCallbacks.MC_POST_PEFFECT_EFFECT_UPDATE, ItemMod.onUpdate)

--change + and - around if you want function ItemMod:onCache(player, cacheFlag) if cacheFlag == CacheFlag.CACHE_DAMAGE then if player:HasCollectible(itemid.ITEM) and not hasitem.ITEM then if player.MaxFireDelay >= MIN_FIRE_DELAY + itembonus.FIREDELAYSTAT then player.MaxFireDelay = player.MaxFireDelay - itembonus.FIREDELAYSTAT elseif player.MaxFireDelay >= MIN_FIRE_DELAY then player.MaxFireDelay = MIN_FIRE_DELAY end end if player:HasCollectible(itemid.ITEM) and not hasitem.ITEM then player.Damage = player.Damage + itembonus.DAMAGESTAT end end if cacheFlag == CacheFlag.CACHE_SHOTSPEED then if player:HasCollectible(itemid.ITEM) then player.ShotSpeed = player.ShotSpeed + itembonus.SHOTSPEEDSTAT end end if cacheFlag == CacheFlag.CACHE_RANGE then if player:HasCollectible(itemid.ITEM) then player.TearHeight = player.TearHeight + itembonus.TEARHEIGHTSTAT player.TearFallingSpeed = player.TearFallingSpeed + itembonus.TEARFALLINGSPEEDSTAT end end if cacheFlag == CacheFlag.CACHE_SPEED then if player:HasCollectible(itemid.ITEM) then player.Speed = player.Speed + itembonus.SPEEDSTAT end end if cacheFlag == CacheFlag.CACHE_LUCK then if player:HasCollectible(itemid.ITEM) then player.Luck = player.Luck + itembonus.LUCKSTAT end end if cacheFlag == CacheFlag.CACHE_FLYING then if player:HasCollectible(itemid.ITEM) then player.CanFly = true end end end

ItemMod:AddCallback(ModCallbacks.MC_EVALUATE_CACHE, ItemMod.onCache)

/r/themoddingofisaac Thread Parent