If you go through your code logically you will see that it is working perfectly!
When I say perfectly, I mean that what you have written will do exactly what you have described it does.
Let's go through it together:
Sprite 999 is your bullet. It doesn't exist at all until you press the spacekey. At which point you position it on screen. However, you are positioning it at the objects co-ordinates, which causes a problem:
Sprites (your bullet) use screen co-ordinates.
Objects (your Ship) use world co-ordinates.
There are two ways around to get around the problem.
1) Position the bullet at the objects screen co-ordinates by using the OBJECT SCREEN X() and OBJECT SCREEN Y() commands.
or
2) (preferred method) Don't use a sprite for your bullet ... it causes problems with positioning (as we have mentioned) but it will also make collision detection unneccesarily awkward. Instead make a plain and texture that with the bullet image. You can then position it as you would any other 3D object.
There are several other errors with your code. The bullet wont move as you would expect. Nor will it ever disappear.
Also this line:
make particles 1, ImageNumber, 50, 20.0
When the help file says
image number it doesn't mean for you to type in 'image number', you are supposed to supply the number which references the image that you want to use for you particles.