Haha, dont put your code in a Doc file then upload it, use the Code button when you post.
BTW, I fixed your nested if problem here you go:
`My First FPS
`Created by Kyle McWhorter
`Date Started:1/29/2007
SYNC ON
SYNC RATE 0
HIDE MOUSE
`Made sphere
make object sphere 1,50
color object 1,rgb(000,255,000)
`Made 2nd sphere
make object sphere 2,50
color object 2,rgb(255,000,000)
position object 2,130,0,0
`Made a wall
make object box 3,100,100,5
position object 3,0,0,150
`Made controls
make object sphere 9999,30
make mesh from object 1,9999
delete object 9999
make object box 4,15,20,50:color object 4,rgb(000,255,255):position object 4,-40,0,0
if object exist(4)=1
if ammo#<maxammo# and intersect object(4,object position x(1),object position y(1)-25, object position z(1),object position x(1),object position y(1),object position z(1))>0
inc clips#,(maxclips#-clips#)
inc ammo#,(maxammo#-ammo#)
delete object 4
endif
endif
add limb 1,1,1
offset limb 1,1,0,0,500
delete mesh 1
make object plain 9999,1,1
position camera 0,500,-500
point camera 0,0,0
`stats
EnemyHP#=5000
Ammo#=1000
MaxAmmo#=1000
do
if upkey()=1 then move object 1,.5
if downkey()=1 then move object 1,-.5
if leftkey()=1 then turn object left 1,.7
if rightkey()=1 then turn object right 1,.7
`ammo amount shooting
if mouseclick()=1
if ammo#>0
dec ammo#,1
endif
if object exist(2)=1
if ammo#>0
if intersect object (2, limb position x(1,1), limb position y(1,1),limb position z(1,1),object Position x(1),object position y (1),object position z(1))>0
dec enemyhp#,1
endif
endif
endif
endif
`kill enemy if health=0
if enemyhp#=0
if object exist(2)=1
delete object 2
endif
endif
`user ammo
if keystate(19)=1 and ammo#=0 and clips#>0 then ammo#=maxammo#:dec clips#,1
`enemy's health display
if object exist(2)=1
center text object screen x(2),object screen y(2)-70,"Enemy Health:"+str$(enemyhp#)
endif
`number of clips
clips#=3
maxclips#=3
text 0,screen height()-50,"ammo: "+str$(ammo#)
text 0,screen height()-40,"clips: "+str$(clips#)
sync
loop
Also, FOR GOD'S SAKE, indent your code!
Quit planning to make a game and make a game.