I use dbMoveSprite to move an array of sprites (bullets) using a loop:
for(int i = 0; i < 100; i++){
if(bulletExist[i] > 0){
dbMoveSprite((i+20),5);
bulletExist[i] = bulletExist[i] - 1;
}
else if(dbSpriteExist(i+20) == 1){
dbDeleteSprite(i+20);
}
}
But somehow, when the loop contains dbMoveSprite, it causes my player-sprite to get stuck at the X-coordinate 302.
Without dbMoveSprites the player moves fine.
I move the playering using:
playerX = playerX + dbRightKey() - dbLeftKey();
playerY = playerY + dbDownKey() - dbUpKey();
dbSprite(1,playerX,playerY,1);