Give_Badge(mob/M in world)
set name = "Give Gym Badge"
set category = "Gym"
if(usr.GymType=="Rock")
var/obj/Rockbadge/B = new/obj/Rockbadge
var/B.loc = M
if(usr.GymType=="Psychic")
var/obj/Psychicbadge/B = new/obj/Psychicbadge
var/B.loc = M
if(usr.GymType=="Grass")
var/obj/Forestbadge/B = new/obj/Forestbadge
var/B.loc = M
if(usr.GymType=="Thunder")
var/obj/Thunderbadge/B = new/obj/Thunderbadge
var/B.loc = M
if(usr.GymType=="Darkness")
var/obj/Darknessbadge/B = new/obj/Darknessbadge
var/B.loc = M
if(usr.GymType=="Flying")
var/obj/Featherbadge/B = new/obj/Featherbadge
var/B.loc = M
if(usr.GymType=="Water")
var/obj/Waterbadge/B = new/obj/Waterbadge
var/B.loc = M
if(usr.GymType=="Fire")
var/obj/Firebadge/B = new/obj/Firebadge
var/B.loc = M
usr<<"You have given [M] your badge"
M<<"[usr] has given you the [usr.GymType] Badge"
Problem description:
its not wut ghost said i think its something else i made all exits and it still does this
well now it says:
Gym leader.dm:163:error:/obj/Grassbadge:undefined type path
Gym leader.dm:169:error:/obj/Darknessbadge:undefined type path
Gym leader.dm:172:error:/obj/Featherbadge:undefined type path
I said that programming is CASE SENSITIVE. That means that /turf/xYz is NOT the same as /turf/XYz nor is it the same as /turf/XYZ, etc.
Did you even try to look up switch()? It would make programming easier when looking for multiple if()s/values from one reference.
The solution to your problem is simple: The object(s) you are creating do not exist. You never made an /obj/Grassbadge, etc... so either make one for check if your path is correct.
Also, this is a forum, not a chatroom; take your time typing things out. The less clear you are, the less help you will receive (and increases the chance of a wrong solution being posted).