Hi I'm getting an error from the stock Lola codebase that I cannot see the problem with. I've managed to fix several other ones, but this one has me confused as to why it's popping up.
The error I get is:
gcc -Wall -g -DLINUX -c -o language.o language.c language.c: In function `translate': language.c:293: parse error before `static' make: *** [language.o] Error 1
Here is the code it is referring to: Can anyone spot what I'm not seeing?
char *translate (CHAR_DATA *ch, char *text) { static char text2[MAX_STRING_LENGTH]; char *pName; int iSyl; int length; int speak;
In C, declarations (including definitions that have assignments) in a function must all come before statements. Your "speak = blah" line is not a declaration, so you may not declare anything else after that. Hence why the suggested fix worked: by making them all into declarations.
The error I get is:
Here is the code it is referring to: Can anyone spot what I'm not seeing?
Thanks!