ID:149554
 
    Red_Smifflion
icon = 'R.dmi'
Click()
if(usr.SG1 == 1)
alert("Reload First!")
if(src == usr)
alert("Dont shoot yourself")
if(usr.ShotGunAmmo <= 1)
alert("Not enough ammo!")
if(usr.S == 0)
return
else
if(usr.SG1 == 1)
alert("Reload First!")
else
src.Life -= 1
missile(/obj/Smifflomer_17C_Bullet,usr,src.loc)
usr.ShotGunAmmo -= 1
usr.SG1 = 1

Ok, the error, EVEN IF YOU NEED TO RELOAD IT DOESNT WORK!
Whats the error?

-KTI
In response to Kappa the Imp
The reloading system, you can shoot multiple shots before having to reload!
In response to FireEmblem
Firstly, I'd suggest not using alerts in an action type game while fighting, just send them normal messages. Secondly, you can clean that up quite a bit. I'm not sure exactly what some of the vars such as SG1 are supposed to be but I'll keep it basically the same.

Red_Smifflion
icon = 'R.dmi'
Click()
if(usr.SG1) usr << "Reload First!"
else if(src == usr) usr << "Dont shoot yourself"
else if(usr.ShotGunAmmo < 1) usr << "Not enough ammo!"
else if(!usr.S) return
else
Life -= 1
missile(/obj/Smifflomer_17C_Bullet,usr,src.loc)
usr.ShotGunAmmo -= 1
usr.SG1 = 1

I think the main problem was that the alerts could be popped up and the player could just ignore them and click again plus those checks didn't prevent the other situations from being tested.
In response to English
if SG1 = 1, you cannot shoot cuz u need to reload. The problem is the reload commands, you can shoot multiple shotgun bullets at a WALL!
obj
Wall
icon = 'Wall.dmi'
density = 1
Click()
if(usr.SG1 == 1)usr<<"Reload First!"
else if(src==usr)usr<<"Don't Shoot Yourself!"
else if(usr.ShotGunAmmo <= 1)usr<<"Not Enough Ammo!"
else if(usr.S == 0)return
else
missile(/obj/Smifflomer_17C_Bullet,usr,src.loc)
usr.ShotGunAmmo -= 1
src.density = 0
src.icon_state = "X"
sleep(1000)
src.density = 1
src.icon_state = ""
usr.SG1 = 1
obj
Smifflomer_17C
desc = "Shot Gun"
icon = 'GunA.dmi'
verb
Reload()
set src in usr.contents
usr.SG1 = 0
Pick_Up()
set src in oview(0)
usr.contents += new/obj/Smifflomer_17C
usr.S = 1
Red_Smifflion
icon = 'R.dmi'
Click()
if(usr.SG1 == 1)usr<<"Reload First!"
else if(src==usr)usr<<"Don't Shoot Yourself!"
else if(usr.ShotGunAmmo <= 1)usr<<"Not Enough Ammo!"
else if(usr.S == 0)return
else
src.Life -= 1
missile(/obj/Smifflomer_17C_Bullet,usr,src.loc)
usr.ShotGunAmmo -= 1
usr.SG1 = 1
Thats all the code for the gun system
In response to FireEmblem
You can shoot multiple shots at a wall because you have that sleep(1000) in there BEFORE you change SG1 to 1. You need to set it in this order:

//other stuff here
SG1 = 1
sleep(1000)
density = 1
//other stuff here