Search found 2 matches
- Wed Dec 21, 2022 10:57 am
- Forum: Modding help
- Topic: [Solved] lua:15: unexpected symbol near 'for'
- Replies: 2
- Views: 2105
Re: lua:15: unexpected symbol near 'for'
You...can't put for loops inside tables. Or if you sometimes can, you really shouldn't ever. Try creating the table as a local variable with all the constants, modify it with the for loop, and then return the table variable.
Thanks! The code is working now, I will now leave the fixed code here ...
- Tue Dec 20, 2022 9:49 pm
- Forum: Modding help
- Topic: [Solved] lua:15: unexpected symbol near 'for'
- Replies: 2
- Views: 2105
[Solved] lua:15: unexpected symbol near 'for'
So I am trying to write a function, which given some inputs automatically creates a valid fluid prototype, however whenever I run my mod with this code I get the error in the title, and I am unable to pinpoint its source. Also I have attached the full mod below.
Code In Question:
--Functions ...
Code In Question:
--Functions ...