Random and sudden "Unexpected token template" issue

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

Moderator: Graphics Moderators

Post Reply
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Random and sudden "Unexpected token template" issue

Post by NekoMaster »

As you'll see in this picture ...

Image

My compiler suddenly decided to reject my template.pnml code and spit out "unexpected token template on line 73"...

This is code I was compiling just fine the other day and today I decided to change some offsets for 6/8 size trains (template_L6A) but now the token line for template_L8A is being rejected when it was just fine the other day...

This isn't the first time this has happened to me and I dunno how to fix it other then redoing the project from the ground up >_>

Any ideas guys? Pretty hard to work on NARS ADD-ON SET when nothing will compile.

EDIT : Just in case someone says that perhaps its due to me working out of my dropbox folder with ~ tilde's in the name. I did try moving the project to the root of my C:\ and D:\ drives and the compiler still complains about that "template" token
Attachments
nml-problem.png
(130.47 KiB) Not downloaded yet
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Random and sudden "Unexpected token template" issue

Post by Alberth »

Check the generated .nml file, find the correct place by searching for something unique near the line with the error, like that comment at line 70.
Given that it barks about the first thing on the template line, likely the construct before isn't properly ended or so.
Being a retired OpenTTD developer does not mean I know what I am doing.
User avatar
Sylf
President
President
Posts: 957
Joined: 23 Nov 2010 21:25
Location: ::1

Re: Random and sudden "Unexpected token template" issue

Post by Sylf »

If the unexpected token is the first word of the line, then it's worth looking at the last non-comment line before the line highlighted by the error.
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Random and sudden "Unexpected token template" issue

Post by NekoMaster »

I'd like to say this has been solved earlier, and I've already released an update to NARS ADD-ON SET
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 22 guests