Obscure verge 3 VC bug!
Displaying 1-5 of 5 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
KilloZapit

I was going crazy trying to figure out why my code kept crashing verge 3. Then I figured it out! It will crash if you try to assign a string member of a struct that was defined after an array of the same type! Here is an example:


struct somestruct
{
int someint;
string somestring;
}

somestruct something[5000];
somestruct something2;

void Autoexec()
{
something[1].someint=4;
something[2].somestring="somebodyhatesme";

something2.someint=4;
something2.somestring="somebodyhatesme"; // CRASH!
}

Posted on 2004-02-21 03:34:42

gungnir

Maybe it's just a typo, but shouldn't your struct have a ; after the closing brace?

Posted on 2004-02-21 04:25:32

vecna

semicolons ending a struct in VC is optional.

However, I know what the bug is. Its a bug in string array declarations (and the array of a struct which contains a string counts).

I will be releasing a new EXE tommorow, it will fix it.

Posted on 2004-02-21 04:32:02

gungnir

I have a an array of a structure containing a string in pepperX, but it doesn't cause any trouble... so I figured they were good. Then again, maybe I just got lucky :)

Posted on 2004-02-21 04:54:50

vecna

They work within themselves, but any strings declared after the array has a screwed up offset.

Posted on 2004-02-21 05:47:44


Displaying 1-5 of 5 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.