ID:658080
 
turf
Dragonhouse
density = 1
Enter()
if(usr.GL=="Dragon")
return 1
usr << "Welcome home Dragon Gym Leader."
else
usr << "You arn't a the Dragon Gym Leader!"



Problem description:well the pokemon game source i have has a Enter house Turf and im making a Gymleader house enter turf but i keep getting Coding\turf.dm:213:error: usr.GL: undefined var

GL is not a variable.

You should also put the code in side the <dm> code here </dm> so people can view it better.

You should learn how to program in DM instead of using someone elses source code.
DM tags are there for you to put your code in.

Enter doesn't take a "usr". Use src to refer to the turf. If you want to refer to the atom entering the turf, then you need to remember (learn *cough*) that Enter() takes the atom as an argument:
turf/DragonHouse
density = 1
Enter(atom/a)
if(ismob(a))
var/mob/m = a
if(m.GL == "Dragon") {m << "Welcome home, Dragon Gym Leader.";return 1}
else {m << "You aren't the Dragon Gym Leader, you cannot enter.";return 0}
..()


Keep in mind that Enter() is called as a "preemptive check" to someone entering the turf. Setting the turf's density to 1 is going to stop them either way. Keep it at 0, and just deny access to those who can't enter by returning 0 in Enter().