I just started on the byond guide, even trough i have been on byond for close to 1/2 years.
I know that the community talks alot about usr in a proc, and i to got a question about it.
My question is: Is using [usr] for in a string that is in a proc just as bad as usr in a proc??
mob
{
Login()
{
world << "Hello, to [usr]."
}
}
Or do you need to use src in a text to as long as the string is in a proc?
mob
{
Login()
{
world << "Hello, to [src]."
}
}
I appreciate it that you took the time to read my post.
-Ndangerman
Usr in proc is only safe if you're 100% sure only ONE person, that being the 'usr', can call the proc.
This includes things as Mouse functions (Click(), DblClick(), MouseDrag(), ...), client/Topic(), client movement, ...
mob/Login() is also safe, until you implement a saving/loading system where the player is loaded into a mob, then Login() won't be called by the usr any more.
I'm sure people like Lummox or Nadrew can give more explanation about this, though.
More info can be found here.