IsByondMember: undefined proc? in Developer Help
|
|
I'm try to make doors that see if you are a subscriber or a byond member & if not do not allow you to enter,
Code:
turf/Doors BMDoor icon_state = "Door" Enter() if(usr.y==src.y-1) if(IsByondMember(usr)) return 1 else return 0 else return 1 SubDoor icon_state = "Door" Enter() if(usr.y==src.y-1) if(CheckPassport("Pass")) return 1 else return 0 else return 1 BMSDoor icon_state = "Door" Enter() if(usr.y==src.y-1) if(client.IsByondMember()) return 1 if(client.CheckPassport("0123456789abcdef")) return 1 else return 0 else return 1 Door icon_state = "Door"
|
Problem description:
Doors.dm:6:error: IsByondMember: undefined proc
Doors.dm:15:error: CheckPassport: undefined proc
Doors.dm:24:error: client.IsByondMember: undefined var
Doors.dm:26:error: client.CheckPassport: undefined var
|
The second two are because "client" as a variable doesn't exist there, so anything using "client" makes no sense.
What you want to do, in all cases there, is grab usr, and confirm it has a client, then check that.
Those procs should probably live under /turf/Doors, and be called like ...
If it's a common pattern for you, knock the two procs into one: