Error when placing coins in smart check on "tight spot"

This subforum contains all the issues which we already resolved.
Post Reply
FurbyFubar
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Apr 15, 2016 7:36 pm
Contact:

Error when placing coins in smart check on "tight spot"

Post by FurbyFubar »

Placing a stack of coins in the smart chest on the campaign mission "Tight Spot" and pressing "Start" to run the factory gives the following error message:

"Error while running the event handler:
...ta/Roaming/Factorio/temp/currently-playering/tightspot.lua:196: Item stack count has to be a positive number."

The game is then exited to main menu without saving.

Save file where you should just have to press start to replicate the bug: https://www.dropbox.com/s/uk6qhli3nomtr ... e.zip?dl=0

In case it somehow matters: I'm running the game through Steam on Windows 10.

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Error when placing coins in smart check on "tight spot"

Post by daniel34 »

This seems to be a generic issue where LuaEntity.remove_item(items) gives an error when the count is 0.
Can also be produced in freeplay:

Code: Select all

/c game.local_player.remove_item{name = "iron-plate", count = 0}
Cannot execute command. Error: [string "game.local_player.remove_item{name = "iron-pl..."]:1: Item stack count has to a be positive number
(also note the has to a be positive number in the message, grammatical error)

I think this should do nothing with a count of 0 (instead of throwing an error), but return an error when the count is negative.
quick links: log file | graphical issues | wiki

NitrousWolf
Burner Inserter
Burner Inserter
Posts: 17
Joined: Mon Oct 27, 2014 8:43 pm
Contact:

"Tight Spot" Campaign error when all Money is used

Post by NitrousWolf »

This is the same console error observed by thisviewtopic.php?f=7&t=23731&hilit=tight+spot but with more serious repercussion since it can arise from just regular play trying to complete the level

I managed to get so close finishing on level 3 of the Tight Spot Campaign but I ran out of money. I spent the last 35 coins exactly on a smart inserter then moved a lot of the factory around a bit and hit Start to test it. But lo an error kills the level and returns me to the main menu.

Version:
0.12.29 (Build 17931, win64, steam)

Repro steps:
1. Begin any of the Tight Spot Campain levels
2. Open the marketplace to buy things
3. Spend every last bit of money you have. (e.g. Shift+leftClick the burner drill)
4. Press the Start button

Result:
an error message appears, which will return the user to the main menu when confirmed
"
Notice
Error while running the event handler:
..ta/Roaming/Factorio/temp/currently-playing/tightpost.lua:196: Item stack count has to be positive number
"

Expected Result:
Completion of level should be possible with zero money remaining
Attachments
20160418224121_1.jpg
20160418224121_1.jpg (1.39 MiB) Viewed 3870 times
Last edited by NitrousWolf on Mon Apr 18, 2016 10:30 pm, edited 1 time in total.

Loewchen
Global Moderator
Global Moderator
Posts: 8301
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: "Tight Spot" Campaign error when all Money is used

Post by Loewchen »

viewtopic.php?f=7&t=23731
As this post is more detailed, a mod might want to fuse them.

Koub
Global Moderator
Global Moderator
Posts: 7198
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Error when placing coins in smart check on "tight spot"

Post by Koub »

[Koub] Topics merged
Koub - Please consider English is not my native language.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Error when placing coins in smart check on "tight spot"

Post by Klonan »

Thanks for the report

Can confirm it and reproduce it
(I might even fix this myself)

Post Reply

Return to “Resolved Problems and Bugs”