Page 1 of 1

Wrong error message when changing filter_count of loader

Posted: Sat Oct 06, 2018 4:11 pm
by Reika
Trying to change "filter_count" of a loader entity prototype, to nine filters, gives the following error:
Error while loading entity prototype "ore-loader" (loader): Maximum count of filtered items in loader is 9
In other words, that error is thrown even with a loader with nine filter slots, whereas the error states that nine or fewer should be fine. Should you change that 9 to anything else over five, you get the same error, telling you the maximum is whatever you put. Including fun stuff like this:
Image


It almost sounds like the error is supposed to print the maximum allowed filter count, but is instead printing the actual filter count.

In other words, something like this:

Code: Select all

int current = prototype.filter_count;
int maximum = Constants.MAX_LOADER_FILTERS;

if (current > maximum)
	throw new IllegalArgumentException("Error while loading entity prototype "+prototype.name+" ("+prototype.type+"): Maximum count of filtered items in loader is "+current)
Where it should be maximum, not current, in the printout.

Re: Wrong error message when changing filter_count of loader

Posted: Sat Oct 06, 2018 5:25 pm
by posila
Thanks for the report.
It should really say maximum number of filters is 5.

Fixed for 0.17