Cunning fox Posted March 8, 2017 Share Posted March 8, 2017 Hello! I'm making mod with custom cook pot, and all works perfectly on non-dedicated server, but on dedicated servers it crashing with [string "scripts/widgets/containerwidget.lua"]:29: attempt to index local 'widget' (a nil value) My prefab is here: alchemypot.lua full log here: client_log.txt Thanks everyone for your replys! If someone'll help me, I can give you some skins! 1 Link to comment https://forums.kleientertainment.com/forums/topic/75597-help-with-crash/ Share on other sites More sharing options...
PanAzej Posted March 8, 2017 Share Posted March 8, 2017 (edited) Here's a slightly changed code from my Festivizer mod: -- CONTAINERS: local containers = GLOBAL.require("containers") local oldwidgetsetup = containers.widgetsetup _G=GLOBAL mods=_G.rawget(_G,"mods")or(function()local m={}_G.rawset(_G,"mods",m)return m end)() mods.old_widgetsetup = mods.old_widgetsetup or containers.smartercrockpot_old_widgetsetup or oldwidgetsetup containers.widgetsetup = function(container, prefab, ...) if (not prefab and container.inst.prefab == "alchemypot") or (prefab and container.inst.prefab == "alchemypot") then prefab = "cookpot" end return oldwidgetsetup(container, prefab, ...) end Paste this into modmain. This should fix the issue. Edited March 8, 2017 by PanAzej Link to comment https://forums.kleientertainment.com/forums/topic/75597-help-with-crash/#findComment-879561 Share on other sites More sharing options...
Cunning fox Posted March 8, 2017 Author Share Posted March 8, 2017 1 minute ago, PanAzej said: Here's a slightly changed code from my Festivizer mod: -- CONTAINERS: local containers = GLOBAL.require("containers") local oldwidgetsetup = containers.widgetsetup _G=GLOBAL mods=_G.rawget(_G,"mods")or(function()local m={}_G.rawset(_G,"mods",m)return m end)() mods.old_widgetsetup = mods.old_widgetsetup or containers.smartercrockpot_old_widgetsetup or oldwidgetsetup containers.widgetsetup = function(container, prefab, ...) if (not prefab and container.inst.prefab == "alchemypot") or (prefab and container.inst.prefab == "alchemypot") then prefab = "cookpot" end return oldwidgetsetup(container, prefab, ...) end Paste this into modmain. This should fix the issue. Oh god, thank you! 1 Link to comment https://forums.kleientertainment.com/forums/topic/75597-help-with-crash/#findComment-879562 Share on other sites More sharing options...
Cunning fox Posted March 8, 2017 Author Share Posted March 8, 2017 (edited) 13 minutes ago, PanAzej said: Here's a slightly changed code from my Festivizer mod: -- CONTAINERS: local containers = GLOBAL.require("containers") local oldwidgetsetup = containers.widgetsetup _G=GLOBAL mods=_G.rawget(_G,"mods")or(function()local m={}_G.rawset(_G,"mods",m)return m end)() mods.old_widgetsetup = mods.old_widgetsetup or containers.smartercrockpot_old_widgetsetup or oldwidgetsetup containers.widgetsetup = function(container, prefab, ...) if (not prefab and container.inst.prefab == "alchemypot") or (prefab and container.inst.prefab == "alchemypot") then prefab = "cookpot" end return oldwidgetsetup(container, prefab, ...) end Paste this into modmain. This should fix the issue. I can give you some skins Do you want them? Edited March 8, 2017 by makar5000 1 Link to comment https://forums.kleientertainment.com/forums/topic/75597-help-with-crash/#findComment-879565 Share on other sites More sharing options...
PanAzej Posted March 8, 2017 Share Posted March 8, 2017 1 minute ago, makar5000 said: I can give you some kins/ Do you want them? Nah, I don't need anything. Link to comment https://forums.kleientertainment.com/forums/topic/75597-help-with-crash/#findComment-879566 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now