Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / DarkGDK Error?

Author
Message
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 6th Oct 2008 00:37
I'm getting this weird error:

Quote: "Run-Time Check Failure #2 - Stack around the variable 'Raptor' was corrupted."


Heres my main:


And heres my Monsters Class Header Followed by the CPP.


SushiBox
16
Years of Service
User Offline
Joined: 20th Sep 2008
Location: Ohio
Posted: 7th Oct 2008 01:18
On this line?



It would help if you included a line number.

www.Helios-Online.net
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 7th Oct 2008 05:33
Sry, its not a compile error, its a runtime error, so I dont have a line number
SushiBox
16
Years of Service
User Offline
Joined: 20th Sep 2008
Location: Ohio
Posted: 7th Oct 2008 05:59
Ah I wasn't reading very well sorry haha.

You either didn't allocate "Raptor" enough mem in your array, or didn't allocate it any.

for example



I may be wrong or unclear about this. But that is what this error means. Its too late to sift through your source code. I would try to debug it here, but I don't have your full source unfortunatly.

www.Helios-Online.net
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 7th Oct 2008 06:41
Raptor is in my main, it not an array its one variable (class object)
kBessa
18
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 7th Oct 2008 07:46
Hey Reikumar, I don't you problem here but one thing I noticed.

In the Object Step Foward thread you said it would only move sideways, the problem is at this line of code:

dbPositionObject(40, dbObjectPositionX(40),MonsterHeight, 100);


This is always repositioning the object to 100 in the Z axis. It probably should be:

dbPositionObject(40, dbObjectPositionX(40),MonsterHeight, dbObjectPositionZ(40);

[center][center]
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 7th Oct 2008 08:53
Quote: "Hey Reikumar, I don't you problem here but one thing I noticed.

In the Object Step Foward thread you said it would only move sideways, the problem is at this line of code:

dbPositionObject(40, dbObjectPositionX(40),MonsterHeight, 100);


This is always repositioning the object to 100 in the Z axis. It probably should be:

dbPositionObject(40, dbObjectPositionX(40),MonsterHeight, dbObjectPositionZ(40);"



Wow... thats pathetic. How did I not noticed that

Thanks

Login to post a reply

Server time is: 2024-11-25 03:55:42
Your offset time is: 2024-11-25 03:55:42