sitca2 Posted March 8, 2014 Share Posted March 8, 2014 I have an errorand already had very advanced Game PLEASE HELP!!! Tengo ese ERRORMe pueden ayudar POR FAVOR????? Link to comment https://forums.kleientertainment.com/forums/topic/32505-help-i-have-a-errorfor-mods-or-i-dont-know-tengo-un-error/ Share on other sites More sharing options...
Battal Posted March 8, 2014 Share Posted March 8, 2014 Don't spam. Link to comment https://forums.kleientertainment.com/forums/topic/32505-help-i-have-a-errorfor-mods-or-i-dont-know-tengo-un-error/#findComment-427060 Share on other sites More sharing options...
squeek Posted March 8, 2014 Share Posted March 8, 2014 Which mods are you using? Link to comment https://forums.kleientertainment.com/forums/topic/32505-help-i-have-a-errorfor-mods-or-i-dont-know-tengo-un-error/#findComment-427071 Share on other sites More sharing options...
sitca2 Posted March 8, 2014 Author Share Posted March 8, 2014 was the infinitearmor but now is the infiniteToolsHELP? Link to comment https://forums.kleientertainment.com/forums/topic/32505-help-i-have-a-errorfor-mods-or-i-dont-know-tengo-un-error/#findComment-427089 Share on other sites More sharing options...
squeek Posted March 8, 2014 Share Posted March 8, 2014 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 https://forums.kleientertainment.com/forums/topic/32505-help-i-have-a-errorfor-mods-or-i-dont-know-tengo-un-error/#findComment-427101 Share on other sites More sharing options...
iWitch Posted March 14, 2014 Share Posted March 14, 2014 (edited) well finiteuses component can be overrided till bug fixso 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 FiniteUsesand add tag "infinite" to any object that must not end Edited March 14, 2014 by iWitch Link to comment https://forums.kleientertainment.com/forums/topic/32505-help-i-have-a-errorfor-mods-or-i-dont-know-tengo-un-error/#findComment-431300 Share on other sites More sharing options...
squeek Posted March 14, 2014 Share Posted March 14, 2014 (edited) That's a good solution, iWitch. There's a few syntax errors, though: the return is unnecessary, and you can't access the functions using the tbl:fn syntax, only call/define them; it should be local oldSetUses = FiniteUses.SetUses. Edited March 14, 2014 by squeek Link to comment https://forums.kleientertainment.com/forums/topic/32505-help-i-have-a-errorfor-mods-or-i-dont-know-tengo-un-error/#findComment-431305 Share on other sites More sharing options...
iWitch Posted March 14, 2014 Share Posted March 14, 2014 oh yes, its mistake about ":"about return - its just my common copypaste for such functions. So if function must return something, you not failed. Link to comment https://forums.kleientertainment.com/forums/topic/32505-help-i-have-a-errorfor-mods-or-i-dont-know-tengo-un-error/#findComment-431312 Share on other sites More sharing options...
squeek Posted March 14, 2014 Share Posted March 14, 2014 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 https://forums.kleientertainment.com/forums/topic/32505-help-i-have-a-errorfor-mods-or-i-dont-know-tengo-un-error/#findComment-431315 Share on other sites More sharing options...
iWitch Posted March 14, 2014 Share Posted March 14, 2014 oh, code that i posted is supposed to be in scripts/components/whatever.lua inside mod directory Link to comment https://forums.kleientertainment.com/forums/topic/32505-help-i-have-a-errorfor-mods-or-i-dont-know-tengo-un-error/#findComment-431328 Share on other sites More sharing options...
squeek Posted March 14, 2014 Share Posted March 14, 2014 (edited) 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. Edited March 14, 2014 by squeek Link to comment https://forums.kleientertainment.com/forums/topic/32505-help-i-have-a-errorfor-mods-or-i-dont-know-tengo-un-error/#findComment-431332 Share on other sites More sharing options...
iWitch Posted March 14, 2014 Share Posted March 14, 2014 about scripts/modname is good idea, i was afraid that mod directory structure must be same as game have, so i decided to place it in similar directories Link to comment https://forums.kleientertainment.com/forums/topic/32505-help-i-have-a-errorfor-mods-or-i-dont-know-tengo-un-error/#findComment-431336 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