Write in Invalid memory area?

Game Editor comments and discussion.

Write in Invalid memory area?

Postby EvanBlack » 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.
(\__/) ( Soon... The world)
(O.o )< will be mine!____)
(> < )
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bunny Overlord 2012!
EvanBlack
 
Posts: 202
Joined: Fri Sep 30, 2011 10:17 am
Score: 19 Give a positive score

Re: Write in Invalid memory area?

Postby skydereign » Tue Oct 04, 2011 7:45 am

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?
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Write in Invalid memory area?

Postby EvanBlack » Tue Oct 04, 2011 9:21 am

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.
(\__/) ( Soon... The world)
(O.o )< will be mine!____)
(> < )
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bunny Overlord 2012!
EvanBlack
 
Posts: 202
Joined: Fri Sep 30, 2011 10:17 am
Score: 19 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest