Hornete Posted December 20, 2018 Share Posted December 20, 2018 (edited) I've been trying to fix this problem trying everything I can and it SHOUld work and its pretty identical to my other code but just won't work, apparently there's an unexpected symbol near my ')' at line 48 that I can't find the source of. Any help is appreicated! modmain.lua modinfo.lua Edited December 20, 2018 by Omaremad74 fixed some things Link to comment Share on other sites More sharing options...
Developer bizziboi Posted December 21, 2018 Developer Share Posted December 21, 2018 I think you're missing an 'end'? One to close the retargetfunction and one to close the prefabpostinit. { "character", "monster", "animal" } ) end <<-- that one end) Link to comment Share on other sites More sharing options...
pickleplayer Posted December 21, 2018 Share Posted December 21, 2018 18 minutes ago, Omaremad74 said: I've been trying to fix this problem trying everything I can and it SHOUld work and its pretty identical to my other code but just won't work, apparently there's an unexpected symbol near my ')' at line 48 that I can't find the source of. It looks like you're missing an "end" to the local function here. I've added it in where it should go in the example. Try that out. AddPrefabPostInit("tentacle_pillar_arm", function(inst) local function retargetfn(inst) return FindEntity(inst, TUNING.TENTACLE_PILLAR_ARM_ATTACK_DIST, IsAlive, { "_combat", "_health" },-- see entityscript.lua { "tentacle_pillar_arm", "tentacle_pillar", "prey", "INLIMBO", "tentacle" }, { "character", "monster", "animal" } ) end -- <right here! end) Are you using notepadd++ to edit the code? Here's a tip that I found helped me a lot early on. the little red/grey lines on the left show the "beginning and end" of the functions it detects. if you ever see that the grey line comes to an end at some random blank white space at the very bottom of the page, that means you're missing an "end" or a " ) " somewhere Link to comment Share on other sites More sharing options...
Hornete Posted December 21, 2018 Author Share Posted December 21, 2018 1 minute ago, bizziboi said: I think you're missing an 'end'? One to close the retargetfunction and one to close the prefabpostinit. { "character", "monster", "animal" } ) end <<-- that one end) 1 minute ago, pickleplayer said: It looks like you're missing an "end" to the local function here. I've added it in where it should go in the example. Try that out. AddPrefabPostInit("tentacle_pillar_arm", function(inst) local function retargetfn(inst) return FindEntity(inst, TUNING.TENTACLE_PILLAR_ARM_ATTACK_DIST, IsAlive, { "_combat", "_health" },-- see entityscript.lua { "tentacle_pillar_arm", "tentacle_pillar", "prey", "INLIMBO", "tentacle" }, { "character", "monster", "animal" } ) end -- <right here! end) Are you using notepadd++ to edit the code? Here's a tip that I found helped me a lot early on. the little red/grey lines on the left show the "beginning and end" of the functions it detects. if you ever see that the grey line comes to an end at some random blank white space at the very bottom of the page, that means you're missing an "end" or a " ) " somewhere Thank you both so much! Also pickleplayer I do use Notepad ++ But I never knew the little grey and red lines helped show the end of a function , Thanks for that tip! Link to comment 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