ID:140962
 
Code:
mob/Gym/verb
Warp_To_Gym()
if(usr.GymType=="Rock")
usr.loc = locate(/turf/RockExit)
if(usr.GymType=="Rainbow")
usr.loc = locate(/turf/RainbowExit)
if(usr.GymType=="Water")
usr.loc = locate(/turf/WaterExit)
if(usr.GymType=="Thunder")
usr.loc = locate(/turf/ThunderExit)
if(usr.GymType=="Darkness")
usr.loc = locate(/turf/Darknessexit)
if(usr.GymType=="Flying")
usr.loc = locate(/turf/SkyExit)
if(usr.GymType=="Psychic")
usr.loc = locate(/turf/PsychicExit)
if(usr.GymType=="Fire")
usr.loc = locate(/turf/FireExit)
return




Problem description:

Gym leader.dm:120:error:/turf/Darknessexit:undefined type path

and all the other exits are the same i posted 1 for the example of all exits i dont get wut i do wrong



Ugh, if you are checking multiple values of the same variable, use switch().

And you are getting that error because /turf/Darknessexit does not exist. Remember, most programming languages (if not all) are CASE SENSITIVE. The "exit" part of that /turf differs from the others.
var/turf/T   //  to relocate
switch(X)
if(Y, Z)
T = locate...
if(R)
T = locate...
else // Not R, Y or Z
T = locate...

if(T) // If a /turf exists
A.loc = T
In response to GhostAnime
but i made the exits for 3 of them thought and it still says the same thing did i mis code it or something
In response to Roflmao1298
Yes. You made a typo. Change it to what you'd actually written.

The compiler is always right. Don't say, "but I totally did that!" Figure out where you made the mistake, instead.
In response to Garthor
wut u mean
In response to Roflmao1298
I mean the compiler gave you an error because you made a mistake, not because it's wrong. Fix that mistake, don't claim that it doesn't exist.
In response to Garthor
oh ok so i have to label it as something ok i get it now