ID:669780
 
(See the best response by .screw.)
Code:
        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
Best response
Runtimes tend to clearly explain what is wrong within your code.
    if(usr.GymType=="Dragon")
if(M.Dragon) return
else
new/obj/DragonBadge(M.loc)
M.Dragon = 1
M.Dragonm()
M.b_total += 1

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.
In response to .screw
the other two have been used on other codes and havent failed
In response to Goddess of the Angels
Goddess of the Angels wrote:
the other two have been used on other codes and havent failed

Is dragonlock a global variable or is it defined within a proc/verb? If the latter, can you please show that proc/verb?

.dt
In response to .screw
this is the fire gym lock code

mob/Gym/verb
Lock_Gym()
set category="Gym"
if(usr.GymType =="Fire")
firelock="<font color=red>Closed"
world<<"<font size=2><font color=#571B7e>[usr] has locked the [usr.GymType] gym."


And this is the Fire Gym unlock code its under the same code as the Lock one
    Unlock_Gym()
set category="Gym"
if(usr.GymType =="Fire")
firelock="<font color=green>Open"
world<<"<font size=2><font color=#571B7e>[usr] has unlocked the [usr.GymType] gym."
Where is dragonlock declared?
var
dragonlock


Also, where is /obj/DragonBadge created? You may be spelling something wrong or DragonBadge may not be created under the right type path.
In response to Albro1
i got it fixed thank you for your guys time ill post more if i need more help