wofsauge/External-Item-Descriptions

SaveGame attempt to index a function value

tjquillan opened this issue · 1 comments

As of mod version 4.44 and 4.45 this mod throws the following error:

[INFO] - [External Item Descriptions] Error in "PostRender" call: ...th/mods/external item descriptions_836319872/eid_api.lua:1542: attempt to index a function value (field 'SaveGame')

After doing some looking around I suspect it is related to a58163d in which the SaveGame function was changed to EID:SaveGame which I believe clashes with EID.SaveGame which is acceced as a table as shown below:

if not EID.SaveGame or EID.Config["SaveGameNumber"] == 0 or itemID >= CollectibleType.NUM_COLLECTIBLES or game:GetVictoryLap() > 0 or game:GetSeeds():IsCustomRun() then return false end

return not EID.SaveGame[EID.Config["SaveGameNumber"]].ItemCollection[itemID]

if not EID.SaveGame or EID.Config["SaveGameNumber"] == 0 or game:GetVictoryLap() > 0 or game:GetSeeds():IsCustomRun() then return end

I am not super framiliar with Lua so these are only my best guesses. Hope this is helpful!

That's very silly, I've renamed the function to SaveTheGame which should fix it.
I'm guessing you have the "show items needed for collection" stuff turned on? The error might only happen if you do, so it didn't get caught.