adaneslavo / More-Unique-Components-for-VP

Adds 3rd and 4th unique component to each civilization.
1 stars 6 forks source link

Possible Issue with Player:GetNumUnitPromotions #190

Closed bazaarjack closed 2 years ago

bazaarjack commented 3 years ago

Also, don't see this method listed in the Civ5 API, so not sure how it works, but would be interested in understanding. Found this in the CP DLL.

Could it be an issue with GameInfoTypes missing the new promotions?

Error in the LUA logs : (removed the base directory from the logs, but otherwise untouched)

[602606.515] Runtime Error: \My Games\Sid Meier's Civilization 5\MODS(over) More Unique Components for VP (v 64)\Songhai/Sofa/Sofa.lua:13: attempt to call method 'GetNumUnitPromotions' (a nil value) [602606.859] Runtime Error: \My Games\Sid Meier's Civilization 5\MODS(over) More Unique Components for VP (v 64)\Spain/Armada/Armada.lua:10: attempt to call method 'GetNumUnitPromotions' (a nil value) [602606.859] Runtime Error: \My Games\Sid Meier's Civilization 5\MODS(over) More Unique Components for VP (v 64)\Inca/Chasqui/Chasqui.lua:10: attempt to call method 'GetNumUnitPromotions' (a nil value) [602606.859] Runtime Error: \My Games\Sid Meier's Civilization 5\MODS(over) More Unique Components for VP (v 64)\Byzantium/Dromon/Dromon.lua:40: attempt to call method 'GetNumUnitPromotions' (a nil value) [602606.859] Runtime Error: \My Games\Sid Meier's Civilization 5\MODS(over) More Unique Components for VP (v 64)\Assyria/IronChariot/IronChariot.lua:10: attempt to call method 'GetNumUnitsOfType' (a nil value) [602606.859] Runtime Error: \My Games\Sid Meier's Civilization 5\MODS(over) More Unique Components for VP (v 64)\Austria/Landwehr/Landwehr.lua:10: attempt to call method 'GetNumUnitPromotions' (a nil value) [602606.859] Runtime Error: \My Games\Sid Meier's Civilization 5\MODS(over) More Unique Components for VP (v 64)\Denmark/Langskib/Langskib.lua:8: attempt to call method 'GetNumUnitPromotions' (a nil value) [602606.859] Runtime Error: \My Games\Sid Meier's Civilization 5\MODS(over) More Unique Components for VP (v 64)\Huns/Tarkhan/Tarkhan.lua:19: attempt to call method 'GetNumUnitPromotions' (a nil value)

pineappledan commented 2 years ago

Sorry for the late reply Has this been resolved by the newest versions? It was a new lua method when implemented as a way to optimize the lua. I haven't seen these errors in my own logs, perhaps it is due to an old version of the CBP DLL mismatched to a newer version of 4UC?

bazaarjack commented 2 years ago

It was resolved by updating to a newer VP. Thanks for reply.