[0.17.23]LuaCharacter.set_request_slot() inconsistency and typo

This subforum contains all the issues which we already resolved.
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

[0.17.23]LuaCharacter.set_request_slot() inconsistency and typo

Post by Choumiko »

LuaCharacter.set_request_slot() doesn't let you set 0 as the requested amount, whereas you can set a 0 request via the GUI just fine.

To reproduce:

Code: Select all

/c game.player.character.set_request_slot({name="wood", count=0}, 1)
Results in an error:
Cannot execute command. Error: Item stack count has to a be positive number
The message should be "has to be a" and not "has to a be"

I'd expect the call to work even when count is 0.
But reading the error it might actually be because the implementation of item stack doesn't allow count to be 0, which makes sense i guess.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14338
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.23]LuaCharacter.set_request_slot() inconsistency and typo

Post by Rseding91 »

Thanks for the report. It's now fixed for the next version of 0.17.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”