When loading mod it load comments. example
data:extend(
{
--[[
{
type = "tool",
name = "testTool",
icon = "__base__/graphics/icons/science-pack-1.png",
icon_size=32,
subgroup = "science-pack",
order = "a[science-pack-1]",
stack_size = 200,
durability = 10,
},
--]]
})
when you try start game it throw error "Failed to load mods: File not found:__base__/graphics/icons/science-pack-1.png
[0.17.24] Mod loader load comments
Re: [0.17.24] Mod loader load comments
No, it does not. I can copy paste your code and it will result in the expected error (invalid prototype array), not the error that you describe. Moving this to modding help.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: [0.17.24] Mod loader load comments
Ok i solved it. If start 2x multiline comment and put ]] comment stop but editor show comment continue.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: [0.17.24] Mod loader load comments
Code: Select all
--[[
Code: Select all
]]
Code: Select all
]]--
Code: Select all
--
Code: Select all
--]]
Re: [0.17.24] Mod loader load comments
Lua has nested comments?! A comment within a block comment disables the end of the block from being recognized?bobingabout wrote: ↑Fri Apr 05, 2019 1:19 pmdoes nothing as you've written a comment block closer, as a comment.Code: Select all
--]]
Re: [0.17.24] Mod loader load comments
That is not true. ]] will always close a block comment, even if it is commented out itself. There is actually a good reason to use --]] instead of ]] to close comments:bobingabout wrote: ↑Fri Apr 05, 2019 1:19 pmdoes nothing as you've written a comment block closer, as a comment.Code: Select all
--]]
Code: Select all
--[[
game.print("Hello World!") -- this line is skipped
--]]
game.print("Hello again!") -- this will print
Code: Select all
---[[ three hyphens
game.print("Hello World!") -- this will print
--]] this does not cause a syntax error because ]] is commented out
game.print("Hello again!") -- this will also print