Page 1 of 1

NMLC doesnt accept spritelayout definitions

Posted: 14 Mar 2018 15:15
by PNDA
Hello,

im encountering this issue when i try to perform the -o action in NMLC (Converting NML to GRF)

Im a newbie and just creating single Vehicles for me and my friends :D Couldnt find anything in the internet about this

My .nml line 64

Code: Select all

name:                         string(STR_BTSW_NAME);
Error in CMD:

Code: Select all

nmlc ERROR: "BTSW\BTSW.nml", line 64: Syntax error, unexpected token "_NAME"

Re: NMLC doesnt accept spritelayout definitions

Posted: 14 Mar 2018 15:22
by Gwyd
If you could show the surrounding block/few lines of code, that may help us solve your problem here.

Re: NMLC doesnt accept spritelayout definitions

Posted: 14 Mar 2018 15:52
by PNDA
Here are my properties for the vehicle:
(Note: I have fixed my actual problem by putting NAME before the Vehicle NAME.)

Code: Select all

item (FEAT_ROADVEHS, item_tram_BTSW) {
   property {
        name:						string(STR_NAME_BTSW);
		climates_available:			ALL_CLIMATES;
        introduction_date:			date(2003,1,1);
        model_life:					VEHICLE_NEVER_EXPIRES;
        retire_early:				0;
        vehicle_life:				25;
		reliability_decay:			20;
        loading_speed:				25;
        cost_factor:				224;
        running_cost_factor:		112;
		refittable_cargo_classes:	bitmask(CC_PASSENGERS);
		sprite_id:					SPRITE_ID_NEW_ROADVEH;
        speed:						81 km/h;
		refit_cost:					0;
        power:						420 kW;
		running_cost_base:			RUNNING_COST_ROADVEH;
        weight:						40.5 ton;
        cargo_capacity:				185;
		engine_class:				ENGINE_CLASS_ELECTRIC;
        //sound_effect:				no sound;
        //visual_effect:			use default (none);
        //callback_flags:			no need to set this;
        reliability_decay:			20;
		refit_cost:					0;
		misc_flags:					bitmask(ROADVEH_FLAG_TRAM);
	}
}

   graphics {
	  articulated_part:        switch_articulated_BTSW;
	  length:                  switch_length_BTSW;
	  cargo_capacity:          switch_capacity_BTSW;
	  default:                 switch_spriteset_BTSW;
   }

(Note: I have fixed my actual problem by putting NAME before the Vehicle NAME.)

Also NMLC has a new problem:
nmlc ERROR: "D:\grfs\BTSW\BTSW.nml", line 3: Unknown string "STR_GRF_NAME"

Re: NMLC doesnt accept spritelayout definitions

Posted: 14 Mar 2018 16:08
by Alberth
PandaCode wrote:Also NMLC has a new problem:
nmlc ERROR: "D:\grfs\BTSW\BTSW.nml", line 3: Unknown string "STR_GRF_NAME"
You should have a translation for all strings that you use.

The normal approach is to make a lang/english.lng file with

Code: Select all

##grflangid 0x01
STR_GRF_NAME :My awesome grf
See also https://newgrf-specs.tt-wiki.net/wiki/N ... uage_files

Re: NMLC doesnt accept spritelayout definitions

Posted: 14 Mar 2018 16:17
by PNDA
I do have this .lng file! and i also used --land-dir= in nmlc

Code: Select all

##grflangid 0x01

STR_GRF_NAME			:Bombardier Transportation Type-S Tram
STR_GRF_DESCRIPTION		:{CYAN}The German Bombardier Transportation Type-S Tram{} 
STR_NAME_BTSW     		:Type S Tram
STR_DESC_BTSW		    :Bombardier Transportation Type-S Tram used by VGF in Frankfurt, Germany
(Also Alberth you make good content!)

Re: NMLC doesnt accept spritelayout definitions

Posted: 14 Mar 2018 16:41
by PNDA
Ok..This might be the most stupid mistake ever, but I found the mistake.
I used \englisch.lng instead of \english.lng
It didnt give an error but it didnt detect the file :/
Thanks for the help anyway :D

Re: NMLC doesnt accept spritelayout definitions

Posted: 10 Apr 2018 11:00
by KeldorKatarn
If that doesn't produce a helpful error message then I'd still consider that a bug.