Quote Originally Posted by psycho
Ok I kinda get what you're saying, what I don't understand is how do I make it go through the array if i have not defined the array's dimension?
And I came up with a different scheme, basically with a For loop I make it write the bullet one step up and then one step down I make it erase it. The only problem is that the bullet goes down instead of going up...
Code:
PROCEDURE Bullet_Creation(var Shoot : char);

var X,Y : integer;
BEGIN
X := 20; 
        
        Shoot := readkey;
						IF Shoot = Spacebar THEN
							BEGIN
								FOR Y:= 0 to max_col DO
									BEGIN
            		GOTOXY(X,Y+1);
            		writeln('|');
            		
            		GOTOXY(X,Y-1);
            		writeln(' ');
            		delay(50);	
									END;
           END;
       

END;
Thanks again! hope you can cooperate...
Do it the other way around. Remember that the Y axis moves from top to bottom, so you should minus to move to the top.

[pascal]
GOTOXY(X, Y-1);
writeln('|');

GOTOXY(X, Y+1);
writeln(' ');
delay(50);
[/pascal]