[0.13.11] Cannot set durability to 0

This subforum contains all the issues which we already resolved.
User avatar
theRustyKnife
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Feb 26, 2015 9:26 pm
Contact:

[0.13.11] Cannot set durability to 0

Post by theRustyKnife »

When I try to set the durability of a LuaItemStack to 0, I get an error saying that it has to be greater than or equal to zero.
This in the console causes it too (if you have an apropriate item in the first slot obviously ;)):

Code: Select all

/c game.player.get_inventory(defines.inventory.player_main)[1].durability = 0
I'm not sure if you're actually supposed to be able to do it, but even if not it would be good to at least change the error message.

Rseding91
Factorio Staff
Factorio Staff
Posts: 14150
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.13.11] Cannot set durability to 0

Post by Rseding91 »

It should state that it has to be larger than 0.

If you want to set it to 0 just set it to default and reduce the count by 1.
If you want to get ahold of me I'm almost always on Discord.

User avatar
theRustyKnife
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Feb 26, 2015 9:26 pm
Contact:

Re: [0.13.11] Cannot set durability to 0

Post by theRustyKnife »

Rseding91 wrote:It should state that it has to be larger than 0.

If you want to set it to 0 just set it to default and reduce the count by 1.
That's what I thought. It's just the error message wrong then?

Rseding91
Factorio Staff
Factorio Staff
Posts: 14150
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.13.11] Cannot set durability to 0

Post by Rseding91 »

yes
If you want to get ahold of me I'm almost always on Discord.

Rseding91
Factorio Staff
Factorio Staff
Posts: 14150
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.13.11] Cannot set durability to 0

Post by Rseding91 »

Fixed for 0.13.12.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”