Character_Select
parent_type =/mob
proc/Select()
src<<"Welcome to Kings Landing!"
return ..()
mob/Player
Select()
return ..()
Problem description:
Why does this not work? How can this work?
Code:
Character_Select Problem description: Why does this not work? How can this work? |
The problem you have run into, is that the proc Select() is defined under /mob/Character_Select, while you are trying to override it on /mob/Player.
This won't work, because /mob/Player has no Select() proc to override. You need to define a proc on a parent type (or the same type) in order to override it.
All children of mob will have the same Login() behavior until it's overridden on a child type. The ..() you keep throwing in when you don't need to, calls the last override in the class hierarchy.
Stay away from parent_type until you really strongly grasp polymorphism and object oriented principles.