MF99K Posted February 26, 2016 Share Posted February 26, 2016 I know that there's a bracketing issue with one of my mod files. The problem is, I've checked all the parentheses and brackets and all of them appear to be paired. another file with an issue involves the eater component, but even if I untag the entire eater component I still get the error. flameguinbrain.lua bracket issue gilbo.lua eater component issue Link to comment https://forums.kleientertainment.com/forums/topic/64798-mods-keep-getting-same-errors-after-edited/ Share on other sites More sharing options...
Mobbstar Posted February 26, 2016 Share Posted February 26, 2016 Vector3(self.inst.Transform:GetWorldPosition()))) This line is, unsuprisingly, the culprit. Here's the (hopefully correctly) corrected code portion: Spoiler WhileNode( function() return self.inst.components.teamattacker.teamleader == nil end, "No Leader Wander Action", Wander(self.inst, self.inst.components.knownlocations:GetLocation("myegg") or self.inst.components.knownlocations:GetLocation("herd") or self.inst.Traansform:GetWorldPosition(), Vector3(self.inst.Transform:GetWorldPosition()), GetWanderDistFn, ) ) Here's some style tips I came up with to avoid this kind of scenario: Spoiler Python taught me to use increase indent for every loop, function or open paranthese that takes up more than one line. This makes it easy to spot missing or misplaced "end"s in Lua too. Always write "and" and "or" at the beginning of the next line, not at the end of the previous one. This makes it immediate whether or not the next line is linked to the previous one. Fill long blocks like this one with comments to make them easier to grasp after working on a different portion of code. The larger your project gets, the faster you'll lose your own footsteps. At some point you'll feel like past-you is giving you advice. Also, the end of the root node might have ) and } switched. Just as a forewarning. On a side note, Notepad++ has a special syntax reader that allows you to check parenthesis by clicking on them. There's also a block-grouper next to the line numbers, letting you hide code chunks. Link to comment https://forums.kleientertainment.com/forums/topic/64798-mods-keep-getting-same-errors-after-edited/#findComment-727125 Share on other sites More sharing options...
MF99K Posted February 27, 2016 Author Share Posted February 27, 2016 11 hours ago, Mobbstar said: On a side note, Notepad++ has a special syntax reader that allows you to check parenthesis by clicking on them. There's also a block-grouper next to the line numbers, letting you hide code chunks. I checked that with notepad and couldn't find anything which is why I posted here. Thanks for helping me find it Link to comment https://forums.kleientertainment.com/forums/topic/64798-mods-keep-getting-same-errors-after-edited/#findComment-727443 Share on other sites More sharing options...
MF99K Posted February 27, 2016 Author Share Posted February 27, 2016 (edited) @Mobbstar what about the file with the eater component issue? edit: just checked and the other file is still having the same issue Edited February 27, 2016 by mf99k Link to comment https://forums.kleientertainment.com/forums/topic/64798-mods-keep-getting-same-errors-after-edited/#findComment-727456 Share on other sites More sharing options...
Mobbstar Posted February 27, 2016 Share Posted February 27, 2016 If this is a DS mod (not DST), then you need to assign the foodprefs and oneatfn directly, as there are no access functions. I have no idea what the absorbtion bit is about, but there's no such function either. Link to comment https://forums.kleientertainment.com/forums/topic/64798-mods-keep-getting-same-errors-after-edited/#findComment-727504 Share on other sites More sharing options...
MF99K Posted February 29, 2016 Author Share Posted February 29, 2016 On 2/27/2016 at 11:19 PM, Mobbstar said: If this is a DS mod (not DST), then you need to assign the foodprefs and oneatfn directly, as there are no access functions. I have no idea what the absorbtion bit is about, but there's no such function either. oops, I think I meant to post this in the dst mod section, these are for DST. the only thing I really did to either of these files were delete, deactivate (tag), or rename stuff, so if the absorbtion thing isn't supposed to be there I have no clue. Is there a way I can just get rid of or tag the code that isn't working to stop the error? Link to comment https://forums.kleientertainment.com/forums/topic/64798-mods-keep-getting-same-errors-after-edited/#findComment-728252 Share on other sites More sharing options...
Arkathorn Posted February 29, 2016 Share Posted February 29, 2016 On 2/26/2016 at 10:09 AM, Mobbstar said: On a side note, Notepad++ has a special syntax reader that allows you to check parenthesis by clicking on them. There's also a block-grouper next to the line numbers, letting you hide code chunks. Sublime also has this, along with most coding environments. Link to comment https://forums.kleientertainment.com/forums/topic/64798-mods-keep-getting-same-errors-after-edited/#findComment-728319 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