ID:156530
 
turf/end
icon = 'Finish.dmi'
Entered()
world << "[usr] has finally finished"
usr.loc = locate(2,2,1)
GiveMedal("Finished", src)
mob/proc/GiveMedal(var/medal)
world.SetMedal(medal,usr)
world.GetMedal(medal,usr)

Error:-
Maze.dm:44:error: GiveMedal: undefined proc
turf/end
icon = 'Finish.dmi'
Entered(var/atom/a)
if(ismob(a))//can't assume that only players will enter
var/mob/M=a
world << "[M] has finally finished"
M.loc = locate(2,2,1)
M.GiveMedal("Finished")//src was here :S
mob/proc/GiveMedal(var/medal)
world.SetMedal(medal,usr)
world.GetMedal(medal,usr)
GiveMedal is a proc you defined for your player. You're trying to call src.GiveMedal() when src is /turf/end. Try usr.GiveMedal("Finished").
In response to Kaiochao
usr is a VERY bad idea to use in Entered() and other movement related procedure - unless it is a single player game (and even at that...)

What if a projectile entered, for example? That's what Masschaos100's snippet takes into account.
In response to GhostAnime
I had a complete brain fart. It's Entered(atom/movable/O), where O is what entered src.
In response to Kaiochao

usr.GiveMedal("Finished") worked like a charm (You guys are great!

and i am making a single player game ^_^
Thanks
In response to Taha123
don't use the usr thing, it'll give you runtimes in the long run, if enough non-mob movable atoms such as projectiles pass on it your game might crash
In response to Masschaos100
so what do i use xD! src?
In response to Masschaos100
Entered(atom/movable/Obj/O)
O.GiveMedal("Finished")


is this correct?
In response to Taha123
No, it doesn't really make sense since you want the procedure called on a /mob, not an /obj.

In addition, Entered() does not check the type of the object that enters. This means that Entered() can be called when an /obj enters the object, even though you specified "Entered(mob/M)".

See [link]
In response to GhostAnime
you are all too wise .. i thank you ^_^
In response to Masschaos100
He's only making a simple maze game with a character that must reach the end so I don't think he has go that far unless he wants to modify it further.
In response to SSJCoop
offcourse i want to improve my games and my skills :P
In response to SSJCoop
That is precisely as far as it has to be taken to do this properly. It is literally the bare minimum.