zanderuk Posted August 19, 2014 Share Posted August 19, 2014 Hey, I have a problem that I must say, puzzles me quite a bit. when I opened my game after an update 2 months ago I recieved the error: Error 1 error C2668: 'Leadwerks::Entity::SetPosition' : ambiguous call to overloaded function 3 IntelliSense: more than one instance of overloaded function "Leadwerks::Entity::SetPosition" matches the argument list: function "Leadwerks::Entity::SetPosition(double x, double y, double z, bool global = false)" function "Leadwerks::Entity::SetPosition(float x, float y, float z, bool global = false)" argument types are: (int, int, int) object type is: Leadwerks::Entity I have no idea what to do as I have now deleted the code and tried using one of the third person templates to see if i did a mistake but I get the same error :S Hope you can help me App.cpp Quote Link to comment Share on other sites More sharing options...
bandrewk Posted August 19, 2014 Share Posted August 19, 2014 Try changing SetPosition(0, 1, 0) to SetPosition(0., 1., 0.) and do the same for all other SetPositions 1 Quote Link to comment Share on other sites More sharing options...
nelsoncs Posted August 20, 2014 Share Posted August 20, 2014 The error message means that the function prototypes allow double or float arguments, you are providing int's. Best style might be to use 0.0 instead of 0. You can also cast to float or double in some situations ie. SetPosition ( (float) someVar.x, (float) someVar.y, (float) someVar.z ), if someVar was a struct of int's. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.