if(usr.GymType=="Dragon")
if(M.Dragon==1)
return
else
var/obj/DragonBadge/B = new/obj/DragonBadge
B.loc = M
M.Dragon=1
M.Dragonm()
M.b_total+=1
Problem description:this is for the Dragone badge and the error code
Coding\Gymleader code.dm:874:error: /obj/DragonBadge: undefined type path
Coding\Gymleader code.dm:875:error: B.loc: undefined type: B.loc
Coding\Gymleader code.dm:874:warning: B: variable defined but not used
if(usr.GymType =="Dragon")
dragonlock="<font color=green>Open"
world<<"<font size=2><font color=#571B7e>[usr] has unlocked the [usr.GymType] gym."
Problem description:This is for Unlocking the Gym.Here is the Error code
Coding\Gymleader code.dm:699:error: dragonlock: undefined var
if(usr.GymType =="Dragon")
dragonlock="<font color=red>Closed"
world<<"<font size=2><font color=#571B7e>[usr] has locked the [usr.GymType] gym."
Problem description:this is the locking of the gym and here is the Error code
Coding\Gymleader code.dm:670:error: dragonlock: undefined var
Make sure obj/DragonBadge actually exists. By the way, if this is within a mob/proc, replace usr with src.
With the second and third snippet, it appears that the dragonlock var does not exist.