Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Trying to test but I get a compiler error. Any idea what I'm missing?

c99 cyanDreams.c ai_pred.o ai_prey.o ai_pet.o events.o genMap.o map.o mon.o paint.o item.o monNames.o logging.o -o cyanDreams -L./libtcod-1.6.0/ -ltcod -lm -g -Wall -I./libtcod-1.6.0/include/  -Wl,-rpath,.

cyanDreams.c: In function ‘userInput’:

cyanDreams.c:314:7: error: a label can only be part of a statement and a declaration is not a statement

  314 |       int moveAction = inputMovePlayer(key.c);

      |       ^~~

cyanDreams.c:344:7: error: a label can only be part of a statement and a declaration is not a statement

  344 |       static int tick=0;

      |       ^~~~~~

Well that's no fun.  Hmm... It's explicitly c99...

Ah, not a standard thing. It shows with -Wpedantic... but it's only a warning.
    There's a risk of ambiguity for what the compiler jumps to when you declare something at the start of a case, but the default behavior of gcc works well enough.   I think you've got some sneaky means of inserting -Werror into your build tools.

None of this was every planning on being -Wpedantic. It's just game, not life-critical code. Remember kids, the MISRA standard makes you MISRAble.