Meaning of error reference

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Post Reply
User avatar
Simons Mith
Transport Coordinator
Transport Coordinator
Posts: 326
Joined: 14 Jan 2010 23:45

Meaning of error reference

Post by Simons Mith »

I have a game script with an error in it. The erroneous line is apparently this one:

GSGameSettings::SetValue("difficulty.initial_interest",interest_init);

The error is:

Error scratch minimal/main.nut:101/19: end of statement expected (; or lf)

Well, OK '101' I assume is line '101', quoted above. What does the /19 mean?
I'd have guessed the 19th character but that's 1/3 of the way though the line
at a point of no particular significance. (Edit, should probably have said 'obvious')

While I'm more interested in decoding the error report, what is actually wrong
with that line anyway? It's got a semicolon, and Squirrel's not especially space-
sensitive, is it?
Last edited by Simons Mith on 30 Aug 2015 17:56, edited 1 time in total.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Meaning of error reference

Post by Alberth »

Where did you get the double colon? Afaik, Squirrel uses a single dot.

Did you count the whitespace characters in front of the text too in that "19" ? (where a TAB may be counted as one character, not sure).
Being a retired OpenTTD developer does not mean I know what I am doing.
User avatar
Simons Mith
Transport Coordinator
Transport Coordinator
Posts: 326
Joined: 14 Jan 2010 23:45

Re: Meaning of error reference

Post by Simons Mith »

Ah, so it /is/ 'characters through line' then. Thx for confirmation. Counting tabs as one character it seems to be flagging the 'S' of SetValue, so just after the double colon.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 8 guests