Bonjour,

J'ai la fonction suivante:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
void avancerDroite(BITMAP** buffer, BITMAP* perso_base[2], BITMAP** barre, BITMAP ** sol, BITMAP* imagesPersos[2][4][8], double positionsPersos[2][2], int* enCours, clock_t* debut, clock_t* fin, int img_compt_perso[2][4], int choixPerso){
    int i;
 
    while(*enCours && (positionsPersos[choixPerso][0])!=SCREEN_W/10/2+SCREEN_W/10*9){
                            afficheBase(buffer, sol, barre, perso_base, positionsPersos);
 
                            draw_sprite(*buffer, imagesPersos[choixPerso][0][img_compt_perso[choixPerso][0]], (int)(positionsPersos[choixPerso][0]) - (imagesPersos[choixPerso][0][img_compt_perso[choixPerso][0]])->w/2, (int)(positionsPersos[choixPerso][1]) - (imagesPersos[choixPerso][0][img_compt_perso[choixPerso][0]])->h/2 );
                            blit(*buffer, screen, 0, 0, 0, 0, (*buffer)->w, (*buffer)->h);
                            *fin = clock();
                            if((double)(*fin - *debut) / CLOCKS_PER_SEC > 0.05){
                                img_compt_perso[choixPerso][0] = (++img_compt_perso[0])%8;
                                perso_base[choixPerso] = imagesPersos[choixPerso][0][img_compt_perso[choixPerso][0]];
                                *debut = clock();
                            }
                            (positionsPersos[choixPerso][0])--;
                            rest(10);
 
                            for(i=0; i<10; i++){
                                if((positionsPersos[choixPerso][0]) == (SCREEN_W/10/2 + i*SCREEN_W/10)) *enCours = 0;
                            }
                        }
                        *enCours = 1;
                        clear_keybuf();
}
Et le compilateur me donne cette erreur:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
affichage.c: In function 'avancerDroite':
affichage.c:31:33: error: lvalue required as increment operand
Cette erreur se situe à la ligne 11 dans le code ci-dessus.

Auriez-vous une idée ?

Merci d'avance !