Code: Select all
← [Knmlc ERROR: "D:/bts/locomotiva.nml", line 55: Syntax error, unexpected token "}"
PS: Line 55 is the "property" closing bracket, before the "if".
My code:
Code: Select all
// Name: ALL GP22U
// Description: This .nml file contains data of ALL GP22U locomotive;
// Version: 0.1 - Thursday, July 27, 2017;
// Author: Abydos;
// Licence: GPLv2.
// Sprites, coordinates and sprite groups;
spriteset (all_gp22u, "bts/gfx/gp22u_all.png")
{
//left_x, upper_y, width, height, offset_x, offset_y
[0, 0, 8, 26, -3, -10]
[9, 0, 22, 21, -14, -7]
[32, 0, 32, 13, -14, -6]
[65, 0, 22, 21, -6, -7]
[88, 0, 8, 26, -3, -10]
[97, 0, 22, 21, -14, -7]
[120, 0, 32, 13, -14, -6]
[153, 0, 22, 21, -6, -7]
}
spriteset (all_gp22u_purchase, "bts/gfx/gp22u_all.png")
{
//left_x, upper_y, width, height, offset_x, offset_y
[120, 0, 32, 13, -14, -6]
}
// Locomotive properties and data;
item(FEAT_TRAINS, item_allgp22u)
{
property
{
name: string(STR_GP22UALL_NAME);
climates_available: ALL_CLIMATES & bitmask(CLIMATE_TOYLAND);
introduction_date: date(1997, 1, 1);
vehicle_life: 30;
reliability_decay: 20;
loading_speed: 5;
cost_factor: PURCHASE_COST_GP22U_ALL;
running_cost_factor: RUNNING_COST_GP22U_ALL;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 97 km/h;
misc_flags: bitmask(TRAIN_FLAG_FLIP);
refit_cost: 0;
track_type: RAIL;
ai_special_flag: AI_FLAG_CARGO;
power: 1650 hp;
running_cost_base: RUNNING_COST_DIESEL;
dual_headed: 0;
weight: 73 tons;
ai_engine_rank: 0;
engine_class: ENGINE_CLASS_DIESEL;
tractive_effort_coefficient: 0.3
}
if(param_keep_old_vehs)
{
property
{
model_life: VEHICLE_NEVER_EXPIRES;
}
}
else
{
property
{
model_life: 37;
}
}
graphics
{
purchase: all_gp22u_purchase;
default: all_gp22u;
}
}