Syntax error, unexpected token "item"

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
User avatar
Erato
Chief Executive
Chief Executive
Posts: 740
Joined: 25 May 2015 09:09
Location: The Netherlands

Syntax error, unexpected token "item"

Post 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.
No pics no clicks. Seriously.
ImageImageImageImageImageImage
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 22 guests