# Weird error

This topic is 3408 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

for some rerason, i get this error when i try to set the world bounds for Box2D.

error C2064: term does not evaluate to a function taking 2 arguments


is it something wrong with Box2D? or me? here is how i'm using the functions.

b2AABB World;

World.upperBound(0,0);
World.lowerBound(SCREEN_WIDTH, SCREEN_HEIGHT);


Any ideas on how to fix this error? cause to me it makes no sense. i'm not sure whether it's a Box2D error or a C++ one. so, if you can, please let me know what i can do, thanks.

##### Share on other sites
It looks like you want to call the b2Vec2 constructor on members upperBound and lowerBound. The compiler thinks you're trying to call a method; hence the C2064.

Try:
World.upperBound = b2Vec2(0,0);
World.lowerBound = b2Vec2(SCREEN_WIDTH, SCREEN_HEIGHT);

or look at MikeTacular's answer. [smile]

[Edited by - _fastcall on April 20, 2009 11:31:50 AM]

##### Share on other sites
that worked,thanks. now i can get about using Box2D. just that error seemed weird. anyways, thanks a bunch

##### Share on other sites
The error is not "weird"; it means exactly what it says.

term does not evaluate to a function taking 2 arguments

A "term" is a small portion of an expression, roughly speaking. Here, the term in question is "World.upperBound" or "World.lowerBound".

"Arguments" is another word for "parameters".

To "evaluate to X" means to have a result of X when evaluated. To evaluate a formula is to perform the calculation that the formula indicates.

Thus, the compiler states that selecting the upperBound member of World does not result in a function that takes two parameters. And indeed it doesn't, because the upperBound member of World is not a function that takes two parameters.

The reason it makes this complaint is that the statement "World.upperBound(0, 0)" is saying to call World.upperBound, passing it 0 and 0 as parameters. It can't do this, because World.upperBound is the wrong type.

1. 1
2. 2
3. 3
4. 4
frob
13
5. 5

• 16
• 13
• 20
• 12
• 19
• ### Forum Statistics

• Total Topics
632169
• Total Posts
3004545

×