Page 1 of 1

Write in Invalid memory area?

PostPosted: Tue Oct 04, 2011 4:14 am
by EvanBlack
In my function for creating an ISO map I get a "Write in Invalid Memory Area Error"


Ok after some work I narrowed it down to this

tX = ((TILESIZE[0]/2) * mw)+(TILESIZE[0]/2);
tY = ((TILESIZE[1]/2) * mh)-((TILESIZE[1]/2) * mw);


Can someone explain to me what is wrong with this as opposed to this:

int tW = TILESIZE[0];
int tH = TILESIZE[1];
tX = (tW/2 * mw)+tW;
tY = (tH/2 * mh)-(tH/2 * mw);

This secondary code works as a substitute.

Re: Write in Invalid memory area?

PostPosted: Tue Oct 04, 2011 7:45 am
by skydereign
They both work fine for me. And written like that they should work the same way. Are you sure that is exactly what was typed?

Re: Write in Invalid memory area?

PostPosted: Tue Oct 04, 2011 9:21 am
by EvanBlack
I copied it from my script. I think my GameEditor program is bugged. I have been getting a lot of strange errors especially when it comes to writing or reading from arrays. I would redownload it but it might not be fixable like that. It may be just something to do with how Game Editor works and my computer. But I find work arounds for it so it doesn't bother me too much.

Thanks for verifying that my code wasn't wrong and that my computer is stupid lol.