Ok... um, i dont want to be writing your game for you... I took the time especially to just help you out here
(I personly have NEVER made a weapon and have never used anything like bullets, so this is all new to me, and im just problem solving)
But here is the fixed up code (Fully commented, so you can understand it):
Rem Make bullets and color them so you can distinguish between each bullet
For t = 2 To 22
Make Object Sphere t,5
Color Object t,Rgb(Rnd(255),Rnd(255),Rnd(244))
Hide Object t
Next t
Rem Make Array to hold bulletlife and bulletnum values.
Dim Bullet(22,1)
rem set initial bullet number
bulletnum = 2
Rem stes the program to run as fast as it can
Sync On : Sync Rate 0
Rem start of the main loop
Do
Rem this sets up the bulletlife value ( Bullet(bulletnum,1) = 40 )
Rem moves the object to its starting point
if Mouseclick()=1 and Bullet(bulletnum,1) < 10
Position object bulletnum,X#,Y#-30,Z#
Set object to camera orientation bulletnum
Bullet(bulletnum,1) = 40
Show object bulletnum
Endif
Rem this For...Next loop checks each bullet if its shown (if it has been fired)
Rem if so, it then decreases its bullet life
Rem it then moves the object 30 world units
Rem it then checks to see if the bulletlife has run out, if so, it hides the bullet
For t = 2 To 22
If Object Visible(t) = 1
Bullet(t,1) = Bullet(t,1) - 1
Move object t,30
If Bullet(t,1) <= 0 then Hide object t
Endif
Next t
Rem This just increases the bullet number for the Mouseclick If function above
Rem It will only move ontot he next bulletnum if the previous bullet has been fired,
Rem that is, if bulletlife is greater than 0
Rem It also just uses the same bullets over and again, but using the last line,
If Bullet(bulletnum,1) > 0
Inc bulletnum
If bulletnum > 22 Then bulletnum = 2
Endif
Rem just simple camera movement, so you can see the bullets moving
If Leftkey() = 1 Then Turn Camera Left 1
If Rightkey() = 1 Then Turn Camera Right 1
Rem End of the main loop, updates the screen
sync
loop
Hope I Helped...
Knowladge Belongs To The People...