Skip to main content
GameDev.net gamedev.net
🔒 Locked

Syntax error C2059 problem

Started by u235 Jul 7, 2009 at 10:06 PM 2 replies 1.1k views
Original Post
u235
u235
I'm getting this error and it's driving me nuts. There is nothing in the code that should cause this error, but I was wondering if it might be a problem other people have been experiencing and possible solutions. Here is the error: .\Camera.cpp(22) : error C2059: syntax error : ',' And here is the code:

pos = D3DXVECTOR3(px, py, pz);
lookat = D3DXVECTOR3(lx, ly, lz);
up = D3DXVECTOR3(ux, uy, uz);
D3DXMatrixLookAtLH(&view, &pos, &lookat, &up);
D3DXMatrixPerspectiveFovLH(&projection, fov, w / h, near, far);  //<--C2059
core.device->SetTransform(D3DTS_PROJECTION, &projection);


Thanks for any help in this matter.
V/R,-AJThere are 10 kinds of people in the world: Those who understand binary and those who don't...
alvaro
alvaro
It's possible that your compiler uses far' and/or near' to deal with pointer types. Try changing the names of those variables.
Ariste
Ariste
Quote:
Original post by alvaro
It's possible that your compiler uses far' and/or near' to deal with pointer types. Try changing the names of those variables.


Truth. I had this same problem... nearly drove me insane. Switch the variable names and all should be well.
u235
u235
Thanks for the quick response, guys. Fixed me right up. I think I would have ended up bald trying to figure that out.
V/R,-AJThere are 10 kinds of people in the world: Those who understand binary and those who don't...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.