Jump to content

Forge update broke mods, "badge"


Serpens
  • Known Issue

Hi,

the big forge update broke several mods, at least those that were adding a HUD for beefalo, see my bug report here:
http://steamcommunity.com/workshop/filedetails/discussion/741879530/1482109512309540199/

I hope there are not more new bugs with other mods due to this update =/

Spoiler

[00:11:41]: [string "scripts/widgets/badge.lua"]:28: calling 'SetBank' on bad self (string expected, got table)
LUA ERROR stack traceback:
=[C]:-1 in (method) SetBank (C) <-1--1>
scripts/widgets/badge.lua:28 in (upvalue) constructor (Lua) <6-38>
self =
enabled = true
focus_target = false
anim = UIAnim
focus_flow_args = table: 65E54658
shown = true
owner = health
pulse = UIAnim
can_fade_alpha = true
warning = UIAnim
callbacks = table: 65E546A8
inst = 113757 - (valid:true)
focus = false
focus_flow = table: 65E54860
name = Badge
children = table: 65E546D0
percent = 1
anim = 111513 - wilson (valid:true)
owner = health
scripts/modutil.lua:147 in (field) _ctor (Lua) <146-149>
self =
enabled = true
focus_target = false
anim = UIAnim
focus_flow_args = table: 65E54658
shown = true
owner = health
pulse = UIAnim
can_fade_alpha = true
warning = UIAnim
callbacks = table: 65E546A8
inst = 113757 - (valid:true)
focus = false
focus_flow = table: 65E54860
name = Badge
children = table: 65E546D0
percent = 1
arg = nil
scripts/widgets/healthbadge.lua:11 in (field) _ctor (Lua) <10-61>
self =
enabled = true
focus_target = false
anim = UIAnim
focus_flow_args = table: 65E54658
shown = true
owner = health
pulse = UIAnim
can_fade_alpha = true
warning = UIAnim
callbacks = table: 65E546A8
inst = 113757 - (valid:true)
focus = false
focus_flow = table: 65E54860
name = Badge
children = table: 65E546D0
percent = 1
owner = health
art = 111513 - wilson (valid:true)
../mods/workshop-943432102/scripts/widgets/beefalohealthbadge.lua:4 in (field) _ctor (Lua) <3-5>
self =
enabled = true
focus_target = false
anim = UIAnim
focus_flow_args = table: 65E54658
shown = true
owner = health
pulse = UIAnim
can_fade_alpha = true
warning = UIAnim
callbacks = table: 65E546A8
inst = 113757 - (valid:true)
focus = false
focus_flow = table: 65E54860
name = Badge
children = table: 65E546D0
percent = 1
owner = 111513 - wilson (valid:true)
scripts/class.lua:181 in (upvalue) BeefaloHealthBadge (Lua) <171-184>
class_tbl = table: 68D346F0
arg = nil
obj = Badge
../mods/workshop-943432102/scripts/widgets/beefalowidget.lua:23 in (upvalue) constructor (Lua) <9-51>
self =
shown_position = (580.00, -60.00, 0.00)
shown = true
slotsperrow = 3
hidden_position = (580.00, -200.00, 0.00)
inst = 113755 - (valid:true)
focus = false
children = table: 6B1B21C8
controller_bump = (0.00, 45.00, 0.00)
focus_flow_args = table: 65E543B0
focus_target = false
owner = 111513 - wilson (valid:true)
can_fade_alpha = true
inv = table: 65E541D0
name = Beefalo
bg = Image - images/hud.xml:craftingsubmenu_fullvertical.tex
focus_flow = table: 65E54180
bump_for_controller = false
enabled = true
callbacks = table: 6B1B22B8
owner = 111513 - wilson (valid:true)
scripts/modutil.lua:147 in (field) _ctor (Lua) <146-149>
self =
shown_position = (580.00, -60.00, 0.00)
shown = true
slotsperrow = 3
hidden_position = (580.00, -200.00, 0.00)
inst = 113755 - (valid:true)
focus = false
children = table: 6B1B21C8
controller_bump = (0.00, 45.00, 0.00)
focus_flow_args = table: 65E543B0
focus_target = false
owner = 111513 - wilson (valid:true)
can_fade_alpha = true
inv = table: 65E541D0
name = Beefalo
bg = Image - images/hud.xml:craftingsubmenu_fullvertical.tex
focus_flow = table: 65E54180
bump_for_controller = false
enabled = true
callbacks = table: 6B1B22B8
arg = nil
scripts/modutil.lua:155 in (upvalue) BeefaloWidget (Lua) <151-158>
class_tbl = table: 68D34CE0
arg = nil
[00:11:41]: [string "scripts/widgets/badge.lua"]:28: calling 'SetBank' on bad self (string expected, got table)
LUA ERROR stack traceback:
=[C]:-1 in (method) SetBank (C) <-1--1>
scripts/widgets/badge.lua:28 in (upvalue) constructor (Lua) <6-38>
scripts/modutil.lua:147 in (field) _ctor (Lua) <146-149>
scripts/widgets/healthbadge.lua:11 in (field) _ctor (Lua) <10-61>
../mods/workshop-943432102/scripts/widgets/beefalohealthbadge.lua:4 in (field) _ctor (Lua) <3-5>
scripts/class.lua:181 in (upvalue) BeefaloHealthBadge (Lua) <171-184>
../mods/workshop-943432102/scripts/widgets/beefalowidget.lua:23 in (upvalue) constructor (Lua) <9-51>
scripts/modutil.lua:147 in (field) _ctor (Lua) <146-149>
scripts/modutil.lua:155 in (upvalue) BeefaloWidget (Lua) <151-158>
../mods/workshop-943432102/scripts/patches/beefalodomestication.lua:170 in (method) OpenBeefalo (Lua) <168-178>
../mods/workshop-943432102/scripts/patches/beefalodomestication.lua:120 in (local) fn (Lua) <118-124>
scripts/entityscript.lua:1030 in (method) PushEvent (Lua) <1017-1044>
scripts/mainfunctions.lua:331 in () ? (Lua) <328-333>

 


Steps to Reproduce
download mods: http://steamcommunity.com/sharedfiles/filedetails/?id=810294417 or http://steamcommunity.com/sharedfiles/filedetails/?id=943432102 or http://steamcommunity.com/sharedfiles/filedetails/?id=741879530 and try to euqip a saddle to a beefalo.



User Feedback


Hi Serpens,

Are you the creator of "Beefalo Bell +"? You can fix it by removing the "health" from the call to HealthBadge._ctor in BeefaloHealthBadge:

Change scripts/widgets/beefalohealthbadge.lua from:

local BeefaloHealthBadge = Class(HealthBadge, function(self, owner)
    HealthBadge._ctor(self, "health", owner)
end)

to

local BeefaloHealthBadge = Class(HealthBadge, function(self, owner)
    HealthBadge._ctor(self, owner)
end)

That way it matches the definition in healthbadge.lua. This bug was silently working until we added a new "art" argument and your "owner" was being passed as "art".

  • Like 1

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...