initialize an array
How i initialize an array like this:
sRoute Route[5] =
{
{400.0f,pLand->GetHeight(Enemy->sngPositionX, Enemy->sngPositionZ),100.0f},
{100.0f,pLand->GetHeight(Enemy->sngPositionX, Enemy->sngPositionZ),300.0f},
{300.0f,pLand->GetHeight(Enemy->sngPositionX, Enemy->sngPositionZ),200.0f},
{200.0f,pLand->GetHeight(Enemy->sngPositionX, Enemy->sngPositionZ),100.0f},
{0.0f,pLand->GetHeight(Enemy->sngPositionX, Enemy->sngPositionZ),400.0f}
};
Thanks in advance!!
That is initialised, although im not entirely sure about the function call in the middle. Is it not compiling?
ace
ace
Its compiling but give me a memory error.
I tryed Route = new sRoute[5];
but i didnt have any luck.
Thanks!
I tryed Route = new sRoute[5];
but i didnt have any luck.
Thanks!
The first thing you should try whenever you get something like this is taking out that function call and replace it with a number, just to see if that is the problem. The pointer might be NULL.
ace
ace
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement