Language Error

Hello.

I've been using Box2D for about a week, and I need some help with this error I'm getting.

Quote:
Warning: the current language does not match this frame.
Current language: auto; currently c++


My code compiles, but when it runs it shows that and crashes.

Any help?
http://stackoverflow.com/questions/5651 ... this-frame

...but that's not the reason for the crash. There must be some other, more useful message?
I found where the problem is!

It's in the code creating ground:
Code:
-(void)createagain {
    b2BodyDef groundBodyDef;
    groundBodyDef.position.Set(0, 0);
    b2PolygonShape groundBox;
    b2Vec2 verticies [4];
    (verticies [0]).Set(0, 0);
    (verticies [1]).Set(550 / ratio, 0);
    (verticies [2]).Set(550 / ratio, 10 / ratio);
    (verticies [3]).Set(0, 10 / ratio);
    int32 vcount = 4;
    groundBox.Set(verticies, vcount);
    b2Body* groundBody = World->CreateBody(&groundBodyDef);
    groundBody->CreateFixture(&groundBox, 0);
}


So I guess the question now is:

What wrong with this code?

Please note that I've used Box2d for about a week.
I can't see anything wrong with this code so my only guess would be that World is an invalid pointer, but surely the debugger will tell you an error message and point you to the line where the problem occurs?
Got the answer to the problem.

I put the code in a separate function. So I put it in the viewDidLoad function and it stopped giving errors.

Edit:

I got it to finally work!

Thanks for all the help!

Original thread: https://box2d.org/forum/viewtopic.php?t=8040