#177044 - blessingta@hotmail.co.uk - Fri Dec 02, 2011 1:25 pm
does c also recognise the and percent "&"?
//header
//sections with errors
//c file
Its throwing up these errors now
//header
//sections with errors
Code: |
extern bool find_valid_movepath (unsigned int & uiPiece,/*find piece chosen to be moved*/unsigned char & Move_Piece,/*Locate valid path & make move if true*/unsigned char & pathway,unsigned char Store_valid_moves[9], unsigned char & validpos); |
//c file
Code: |
bool find_valid_movepath (unsigned int & uiPiece,/*find piece chosen to be moved*/unsigned char & Move_Piece,/*Locate valid path & make move if true*/unsigned char & pathway,unsigned char Store_valid_moves[9], unsigned char & validpos); |
Code: |
//whist valid position present
switch (validpos) { case 0: //move invalid return false; //... break; default: //valid move found: now chose uiPiece = (rand() % validpos); //valid move was true valid_move_true (Move_Piece, //extract valid path Store_valid_moves[uiPiece]); return true; break; } |
Its throwing up these errors now
Quote: |
game.c arm-eabi-gcc -MMD -MP -MF /g/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/build/game.d -g -Wall -O3 -mcpu=arm7tdmi -mtune=arm7tdmi -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork -I/g/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/include -I/D/devkitPro/libgba/include -I/g/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/build -c /g/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/source/game.c -o game.o In file included from g:/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/source/game.c:1:0: g:/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/include/game.h:43:47: error: expected ';', ',' or ')' before '&' token g:/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/source/game.c: In function 'check_player_turn': g:/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/source/game.c:157:9: error: case label does not reduce to an integer constant g:/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/source/game.c:169:3: error: case label does not reduce to an integer constant g:/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/source/game.c: In function 'reset_turn_info': g:/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/source/game.c:344:15: warning: unused variable 'ucMove' [-Wunused-variable] g:/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/source/game.c:343:15: warning: unused variable 'ucLocation' [-Wunused-variable] g:/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/source/game.c:342:6: warning: unused variable 'bvalid_Piece' [-Wunused-variable] g:/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/source/game.c: At top level: g:/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/source/game.c:673:40: error: expected ';', ',' or ')' before '&' token g:/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/source/game.c: In function 'Randomly_Place_Piece': g:/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/source/game.c:711:6: warning: variable 'store_valid_moves' set but not used [-Wunused-but-set-variable] g:/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/source/game.c: In function 'ComputerAI_Move': g:/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/source/game.c:766:3: warning: statement with no effect [-Wunused-value] g:/YEAR2/Console_Programming_CONPRG/Course_Work/gba/my_gba_game/source/game.c:768:3: warning: implicit declaration of function 'find_valid_movepath' [-Wimplicit-function-declaration] make[1]: *** [game.o] Error 1 "make": *** [build] Error 2 > Process Exit Code: 2 > Time Taken: 00:01 |