So when I run breakout my paddle wont move with my cursor. As soon as my mouse touches the Gwindow, I get an error in my terminal. here's my code for it, and the terminal output.
while (lives > 0 && bricks > 0)
{
GEvent event = getNextEvent (MOUSE_EVENT);
if (event != NULL)
{
if (getEventType(event) == MOUSE_MOVED)
{
double x = (getX(event) - (getWidth(paddle) / 2));
double y = (getY(paddle));
setLocation(paddle, x, y);
}
}
}
jharvard@appliance (~/Dropbox/pset3/breakout): ./breakout
error: getWidth: Illegal argument type