I made this function just to make the use of random numbers easier in my programs. For some reason the compiler doesn't like it. The error is "void value not ignored as it ought to be".
Code:
int random(int range){
    int r;
    r=srand((unsigned)time(NULL))%range;
    return r;
}
I have a feeling it is something stupid but I did check this time to make sure that I had the right return thing declared in the beginning. what's wrong???
~Sven