Hello !
> blockwrite(f, monster[currentgroupselected][i], monster[groupselected][i]);
Does "monster[groupselected][i]" = the size of the element
"monster[currentgroupselected][i]" ?
If not, try to use this:
BLOCKWRITE(f,Monster[CurrentGroupSelected][i],
SIZEOF(Monster[CurrentGroupSelected][i]));
and ignore "monster[groupselected][i]".
If you want to look at the blockwriting step-by-step using F4 and F7 in the IDE
you beefit sfrom using a WORD type integer, like this:
VAR
bw:WORD;
> blockwrite(f, monster[currentgroupselected][i],
> monster[groupselected][i],bw);
Put "br" in your watch list, and step through the code. You will see that bw
reflects the amount of bytes written to the file. If you use the IDE help one
BLOCKWRITE you will get to know that it takes 3 -4 parameters:
BLOCKWRITE(a,b,c,d);
a = Filehandle
b = Dataarea
c = Bytes to write
d = Optional variable to store number of bytes written.
BLOCKREAD also supopoorts a 4th parameters to store the amount of bytes read
from the file into dataarea.
Enjoy, I hope you find a solution.
Regards Mikkel Breiler, Cosysop Renoz BBS, Amateur Lego Technic engineer