[SVN4871] Paradox Clone can bug out

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

[SVN4871] Paradox Clone can bug out

#1 Post by yufra »

I've been testing the "table.merge" code, and wanted to make sure the chronomancy talents were working correctly. Paradox clone threw the following error when I was pulled back in time:
Lua Error: /data/timed_effects/other.lua:435: attempt to index field '_chronoworlds' (a nil value)
At [C]:-1 __newindex
At /data/timed_effects/other.lua:435
At /engine/Game.lua:231 onTickEndExecute
At /engine/Game.lua:222 tick
At /engine/GameTurnBased.lua:42 tick
At /mod/class/Game.lua:902
The fix is fairly simple (shown below), but I am not 100% certain this is NOT a bug caused by my table.merge changes. I'll probably test this in b37 to check.

Code: Select all

diff --git a/game/modules/tome/data/timed_effects/other.lua b/game/modules/tome/data/timed_effects/other.lua
index a38ffb5..973c10b 100644
--- a/game/modules/tome/data/timed_effects/other.lua
+++ b/game/modules/tome/data/timed_effects/other.lua
@@ -432,6 +432,7 @@ newEffect{
 
                        -- Move back in time, but keep the paradox_future world stored
                        game:chronoRestore("paradox_past", true)
+                       game._chronoworlds = game._chronoworlds or {}
                        game._chronoworlds["paradox_future"] = clone
                        game.logPlayer(self, "#LIGHT_BLUE#You've been pulled into the past!")
                        -- pass health and resources into the new timeline
<DarkGod> lets say it's intended

edge2054
Retired Ninja
Posts: 3756
Joined: Fri May 28, 2010 4:38 pm

Re: [SVN4871] Paradox Clone can bug out

#2 Post by edge2054 »

fixed in the SVN

Post Reply