Access Violation error


02-12-2007 13:30:39

I get an access violation error when trying to compile example 4 in a new solution...

this is where the exception occurs (grassloader.cpp):
float y1, y2;
if (heightFunction){
y1 = heightFunction(x1, z1);
y2 = heightFunction(x2, z2);
} else {
y1 = 0;
y2 = 0;

How do I pass this problem?


02-12-2007 22:07:06

When you say you're trying to compile example 4 in a "new solution", do you mean the included project file works fine, but when trying to make it work with your own solution+project files it doesn't work?

Based on the location of the exception, I'd guess that you're either not supplying a valid height function, or the height function is somehow failing (this might be the case if the terrain wasn't loaded properly, but I'm not sure).