Ok I have tried doing as you said, and I'm sorry if this is something really small that I'm doing wrong but I just cant see the problem so hopefully you can help me with this. Thnx in advance!
My "robotusage.c" looks like this:
Code:
#include "robotusage.h"
int incrementI(int num, int dir)
{
if (dir == 1)
return num += 4;
else return num -= 4;
}
My robotusage.h looks like this:
Code:
#include <stdlib.h>
#include <stdio.h>
#include <GLUT/glut.h>
int incrementI(int num, int dir)
The part of the main.c that is using this code is:
Code:
player.pointX = incrementI(player.pointX, 1);
And it gives me an "error:syntax error before "{" token" in the robotusage.c file. I cant seem to find what I've done wrong.
I would post all of the main.c as well but its quite big until I can sort this stuff out. Thnx again!