[git] Skullcracker lua errors

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
greycat
Sher'Tul
Posts: 1396
Joined: Tue May 11, 2010 11:51 pm

[git] Skullcracker lua errors

#1 Post by greycat »

git 36263a0e6dbd43f948b4e4fa992783428bf2e3a9

Skullcracker doesn't work. (This was also happening when I reported the bugs yesterday, but I waited until those were fixed to be sure this was a separate bug.)

Code: Select all

stack traceback:
	[C]: in function 'error'
	/engine/interface/ActorTalents.lua:152: in function </engine/interface/ActorTalents.lua:134>
Lua Error: /engine/interface/GameTargeting.lua:114: /engine/interface/ActorTalents.lua:152: /mod/class/interface/Combat.lua:334: attempt to index local 'weapon' (a nil value)
stack traceback:
	/mod/class/interface/Combat.lua:334: in function 'isAccuracyEffect'
	/mod/class/interface/Combat.lua:412: in function 'attackTargetWith'
	/data/talents/techniques/thuggery.lua:55: in function </data/talents/techniques/thuggery.lua:47>
	[C]: in function 'xpcall'
	/engine/interface/ActorTalents.lua:147: in function </engine/interface/ActorTalents.lua:134>
	At [C]:-1 
	At [C]:-1 error
	At /engine/interface/GameTargeting.lua:114 fct
	At /engine/interface/GameTargeting.lua:120 targetMode
	At /engine/interface/GameTargeting.lua:185 
	At /engine/KeyBind.lua:229 
[ONLINE PROFILE] sending error

Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Re: [git] Skullcracker lua errors

#2 Post by Hachem_Muche »

The new isAccuracyEffect function doesn't check for non-existent weapons. Fix:

Code: Select all

 game/modules/tome/class/interface/Combat.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua
index d884d9b..2faa90c 100644
--- a/game/modules/tome/class/interface/Combat.lua
+++ b/game/modules/tome/class/interface/Combat.lua
@@ -331,7 +331,7 @@ function _M:getAccuracyEffect(weapon, atk, def, scale, max)
 end
 
 function _M:isAccuracyEffect(weapon, kind)
-	local eff = weapon.accuracy_effect or weapon.talented
+	local eff = weapon and (weapon.accuracy_effect or weapon.talented) or "none"
 	return eff == kind, eff
 end
 
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: [git] Skullcracker lua errors

#3 Post by darkgod »

fixed
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply