Pointer Question
Posted: Sun Oct 14, 2012 12:54 am
I am trying to make a little soccer game and I have a code like this.
Why wont it work??? It gives me an error message
- Code: Select all
Actor* xpointer = getclone("ManU.0");
Actor* ypointer = getclone("ManU.0");
Actor* xpointer1 = getclone("ManU.1");
Actor* ypointer1 = getclone("ManU.1");
xpointer->x;
ypointer->y;
xpointer1->x;
ypointer1->y;
if (abs(xpointer-Ball.x)<abs(xpointer1-Ball.x))
{
P=0;
}
if (abs(xpointer-Ball.x)>abs(xpointer1-Ball.x))
{
P=1;
}
Why wont it work??? It gives me an error message