Jump to content

HELP! I Have a ERROR!For Mods or I don't know [TENGO UN ERROR]


Recommended Posts

was the infinitearmor

 

but now is the infiniteTools

HELP?

It's a game bug. The game assumes the finiteuses component exists on some items but the mod is removing it from them. Disable the Infinite Tools mod and it should no longer crash.

Unfortunately, there's no easy way for the mod to fix this. You might try reporting the bug here.

Link to comment
Share on other sites

well finiteuses component can be overrided till bug fix

so instead of removing component you can check tag, for example "infinite"

 

something like:

FiniteUses = require "components/finiteuses" local oldSetUses = FiniteUses.SetUses or function() return false endlocal oldUse = FiniteUses.Use or function() return false end function FiniteUses:SetUses(val)if self.inst:HasTag("infinite") then self.current = self.total else oldSetUses(self,val) endendfunction FiniteUses:Use(num)if not self.inst:HasTag("infinite") then oldUse(self,num) endend return FiniteUses

and add tag "infinite" to any object that must not end

Link to comment
Share on other sites

oh yes, its mistake about ":"

about return - its just my common copypaste for such functions. So if function must return something, you not failed.

I meant the return at the very bottom, but that's only a problem if the code is inside modmain.lua. If that code was in a separate file that got require'd from modmain, then it's no problem.
Link to comment
Share on other sites

Yeah, I tend to move that sort of stuff out of modmain.lua as well. I'd keep it out of the components folder, though, because it doesn't need to be there and it being there creates the chance for another mod to have a file of the same name. I'd put it somewhere like <modfolder>/scripts/modname/finitetoolspatch.lua and then use require "modname/finitetoolspatch" in modmain.lua.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...