Page 1 of 1

Syntax error, unexpected token "item"

Posted: 12 Jul 2019 10:44
by Erato
Hey!

I'm trying to make a small industry set, but the compiler isn't having it. For some reason, all item tags with FEAT_INDUSTRY or FEAT_INDUSTRYTILE are met with

Code: Select all

nmlc ERROR: "src/IND_ELEC.pnml", line XX: Syntax error, unexpected token "item"
The first of which is the following:

Code: Select all

spriteset(SPRITESET_IND_ELEC_1, "grf/ELEC.png") {
	TEMP_FULLTILE(0,0)
}
SPRITE_LAYOUT(LAYOUT_IND_ELEC_1, SPRITESET_IND_ELEC_1, 60)
item(FEAT_INDUSTRYTILES, TILE_IND_ELEC_1) {
    property {
        substitute: 0;
        land_shape_flags: bitmask(LSF_ONLY_ON_FLAT_LAND);
        accepted_cargos: [[SILC, 8], [METL, 8]];
    }
    graphics { LAYOUT_IND_ELEC_1; }
}
Full source in the attachments.
Does anyone know why this error occurs?

Thanks in advance!




EDIT: problem resolved. Incorrect spritelayout and produce syntax caused the compiler to complain.