News:

Welcome to World of Banished!

Main Menu

Error, can't copy zero bytes

Started by Tom Sawyer, September 28, 2019, 02:15:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tom Sawyer

I have a technical question to the other modders. Maybe someone had it too or has an idea what else to try. Since some time I get this error when packing the mod:

Assert: bytesToCopy > 0 Error, can't copy zero bytes

It always occurs when I pack it over the existing mod. It can be avoided by deleting the bin folder before compiling but that's very time consuming while working on a big mod (waiting for full compiling just to test some small changes). Also, the developer version of the game doesn't work so anymore, which I use to polish things on the fly. I tried to narrow it down by removing parts of the mod and reinstalled the toolkit but still not solved.

Nilla

Does this mean we´ll soon see something new from you? That would be great.

RedKetchup

i have no idea if i had that at begining, since very long time i always ask to delete the /bin and /build folders. i never do it manually, it is written in my .bat


cd RiseofthePharaoh
rmdir bin /S /Q
rmdir build /S /Q
cd ..
bin\x64\Tools-x64.exe /build RiseofthePharaohResources.rsc /pathres ../RiseofthePharaoh /pathdat ../RiseofthePharaoh/bin
bin\x64\Tools-x64.exe /mod Package.rsc:RiseofthePharaoh /pathres ../RiseofthePharaoh /pathdat ../RiseofthePharaoh/bin


> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Tom Sawyer

Thanks for looking at it, Red. I figured it out today. It's a bit odd but was due to files that were compiled in addition when packing the mod because of any dependencies in my mod files and in another run it was then causing the error. If someone will have this problem too, it can be solved either by removing those dependencies (cleaning up mod resources) or if the files are necessary by calling them for explicit compiling in the external resource list. I would explain it more detailed if someones needs it.

I'm happy I can work with the mod again as usual and yes, North 7 is finally happening @Nilla, believe it or not.^^ I have an alpha version so far and go through it fixing and polishing things and then I will make a Beta for brave banished people. :)

Nilla

Nice to hear. :) I just noticed something you might want to look into; the miller of the granary doesn´t seem to work. I have used it before and had no problems, but in that game, it was close to the farms. Here I have no hill for the windmill close to my fields, so I built a mill a bit away and locate a granary next to it but the miller just does labourer´s work so the granary only contains flour from the wheat the windmill miller gets himself far away. In the end, the production of the windmill was lower than in the Farmer's workplace.

Tom Sawyer

Thank you for this find @Nilla. It was a bug inside the granary and I even did not know about it in general. The granary is actually set to store wheat or rye without caring about limits but the game seems to use the first limit if nothing is set and that's wood. So your miller probably stopped storing grain because your log limit is hit while the miller of the mill follows the food limit. I can just fix it by setting the granary to food limit as well.