Write in Invalid memory area?
Posted: Tue Oct 04, 2011 4:14 am
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.
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.