Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NMLC error from Produce block incorrectly refers to switch-block #238

Open
2TallTyler opened this issue Sep 18, 2021 · 1 comment · May be fixed by #321
Open

NMLC error from Produce block incorrectly refers to switch-block #238

2TallTyler opened this issue Sep 18, 2021 · 1 comment · May be fixed by #321

Comments

@2TallTyler
Copy link
Member

Version of NML

0.6.1

Expected result

Attempting to produce a non-whole number quantity of cargo with the Produce block, as in the example below, produces an NMLC error stating that this isn't possible.

Example:

produce (produce_oil_refinery,
	[PASS: 1; OIL_: 1;],      // Consume
	[RFPR: 0.5; FERT: 0.5;],  // Produce
	1                         // Run callback again
	)

Actual result

The error incorrectly refers to a switch-block:

nmlc ERROR: "lumberjack_industries.nml", line 962: This expression is not supported in a switch-block

Steps to reproduce

  1. Try to make NewGRFs in the early morning while not being fully awake :)
  2. Attempt to produce a non-whole number quantity of cargo with the Produce block
  3. Read NMLC error
@glx22
Copy link
Contributor

glx22 commented Sep 18, 2021

Switch and produce blocks are both action2, so all the code is shared. Maybe the error message should also include produce-blocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants