Author Topic: Error, can't copy zero bytes  (Read 867 times)

0 Members and 1 Guest are viewing this topic.

Offline Tom Sawyer

  • Modders
  • Banished Expert
  • *****
  • Posts: 1049
  • Country: no
Error, can't copy zero bytes
« on: September 28, 2019, 02:15:28 AM »
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.

Offline Nilla

  • Champion
  • Banished Expert
  • *****
  • Posts: 2847
  • Country: se
Re: Error, can't copy zero bytes
« Reply #1 on: September 28, 2019, 03:23:18 AM »
Does this mean weŽll soon see something new from you? That would be great.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 10932
  • Country: ca
Re: Error, can't copy zero bytes
« Reply #2 on: September 29, 2019, 09:20:27 AM »
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

Code: [Select]
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 .

Offline Tom Sawyer

  • Modders
  • Banished Expert
  • *****
  • Posts: 1049
  • Country: no
Re: Error, can't copy zero bytes
« Reply #3 on: September 29, 2019, 11:58:22 AM »
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. :)

Offline Nilla

  • Champion
  • Banished Expert
  • *****
  • Posts: 2847
  • Country: se
Re: Error, can't copy zero bytes
« Reply #4 on: September 29, 2019, 01:07:42 PM »
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.

Offline Tom Sawyer

  • Modders
  • Banished Expert
  • *****
  • Posts: 1049
  • Country: no
Re: Error, can't copy zero bytes
« Reply #5 on: October 01, 2019, 01:02:29 AM »
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.

 

SMF spam blocked by CleanTalk