Skip to content
Snippets Groups Projects
Commit 57a00b68 authored by Samuel Wegner's avatar Samuel Wegner
Browse files

Fix nil index error in makeParadoxClone

I'm not sure how/why it happened, but while testing the 1.3.2 beta cut
I got a nil index error in makeParadoxClone() while try to index on
getInven("INVEN"). My character did have an inventory, so this seems
strange. Anyway, it makes sense to check whether INVEN exists before
trying to skip it.

Now, the function checks whether INVEN exists before adding it to the
alt_nodes table.
parent aaf576d9
No related branches found
No related tags found
1 merge request!303Chrono clone fix
......@@ -293,7 +293,7 @@ makeParadoxClone = function(self, target, duration, alt_nodes)
-- Don't copy certain fields from the target
alt_nodes = alt_nodes or {}
alt_nodes[target:getInven("INVEN")] = false -- Skip main inventory; equipped items are still copied
if target:getInven("INVEN") then alt_nodes[target:getInven("INVEN")] = false end -- Skip main inventory; equipped items are still copied
alt_nodes.quests = false
alt_nodes.random_escort_levels = false
alt_nodes.achievements = false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment