In response to Theodis
Theodis wrote:
That procedure separates the two, showing that src = the person deathcheck is called on, and usr = the person whos attacking procedure called the deathcheck.

Wrong! Wrong! Wrong! Wrong! I really suggest you read LummoxJR's article http://www.byondscape.com/ascape.dmb/LummoxJR.2002-1104/ . According to the reference "The only time usr is assigned for you is when a player (in Dream Seeker) executes a verb, clicks something with the mouse, or any other such action." Which means an NPC should never be usr unless you set this up yourself so this should only work when a PC is the attacker and only if the attack was initiated from a verb by the attacker. So if you force a player to attack(maybe a berserk spell or something initiated by another player) usr won't be correct at all even in the PC case. Though according to the reference usr is only set by players actions there are various cases in which the rule is broken mainly in the movement procs but only if they are called by a default proc. If you call them directly it acts as it should which could cause all sorts of problems if you used usr which would definitly be hard to track if you didn't know this. I don't know if this is a bug or an undocumented feature but it's inconsistant so it should be avoided anyway to prevent possible hard to track bugs.

If what lummox said was true, then my tutorial would spit out run-time errors every single time an enemy attacked :)

Also, I am not ignorant. I know the differences myself, and I never use usr in a proc. I am just sick and tired of fixing up a tutorial that I made like two years ago and have already re-fixed like 3 times. Plus, if a newbie knew what an argument was and how to use it, and knew what usr was and how to use it, none of this would happen.

My annoyence from this comes from people complaining about it when the newbie has a completely irrelivent problem. Probably 99% of the time, "Ungh. No put usr in proc." doesn't help the newbie at all, and makes the newbie end up just replacing all the "usr" with "src", thus making his problem become worse.

I will however fix this, but just because I don't do this myself... Not because of all your guy's complaints have taught me how to do it.

In the mean time, however, until it gets published (or rejected for this reason) on BYONDscape, it is basically still in my turf, and I will fix it when I get bored one day.
In response to Kunark
Kunark wrote:
Plus, if a newbie knew what an argument was and how to use it, and knew what usr was and how to use it, none of this would happen.

Unfortuantely I don't think there are many tutorials that really teach that. I know A Step BYOND does, but it's kind of advanced for newbies just starting out. Besides, Kunark's usage of usr absolutely pales in comparison to that of "Your First World". Hopefully someone will update it someday.
In response to Kunark
If what lummox said was true, then my tutorial would spit out run-time errors every single time an enemy attacked :)

Yeah thats because it's either due to a bug or an undocumented feature and in either case you risk it completly falling apart upon an update. Regardless I'm still quite sure it'll fail if another player forces the player to attack(ie the proc wasn't called by the inteded persons verb).

Also, I am not ignorant. I know the differences myself, and I never use usr in a proc.

Then why on earth do it in a tutorial :P?

I am just sick and tired of fixing up a tutorial that I made like two years ago and have already re-fixed like 3 times.

Well if your going to make a tutorial which new people are using it's your responsibility to make sure they don't pick up wrong ideas from it.

Plus, if a newbie knew what an argument was and how to use it, and knew what usr was and how to use it, none of this would happen.

Yep but they're newbies because they're still learning these basic concepts so don't teach it to them wrong.

My annoyence from this comes from people complaining about it when the newbie has a completely irrelivent problem.

It's best to fix all known problems before attempting to isolate the problem. And generally when you do this you end up unknowingly fixing your bug.

Probably 99% of the time, "Ungh. No put usr in proc." doesn't help the newbie at all, and makes the newbie end up just replacing all the "usr" with "src", thus making his problem become worse.

This is also the fault of the newbie. Anyone doing a decent job of learning the language will question why this is the case, get a good responce, and probably not have the problems anymore. If the person just does replace usr with src or try and number of random fixes they aren't learning anything and probably wouldn't anyway since they aren't trying. The worst part with this is if they do manage to get it to work or not fail so bad because then they coorelate what they did with an actual solution and think they know what they are doing. They then end up spreading these "voodoo" solutions to other people when they may be broken or completly unrelated causeing even more confusion.

I will however fix this, but just because I don't do this myself... Not because of all your guy's complaints have taught me how to do it.

You know your making yourself out to be childish with this whole "Well I knew how to do it right, but I just wanted to teach new people a good use of usr in procs thing." thing to defy Lummox JR's blanket statment. Lummox JR knows what he's talking about but as far as I'm concerned usr should be avoided as much as possible and verbs that require it should be short one liners that just call another function passing usr as a parameter to a proc that handles all the work. That way if you ever need to force the action on the play you can always call the proc. And if a verb doesn't require it(like commands owned by the player and call by the player) then you shouldn't use usr so you have verbs which are safe to call from procs.

In the mean time, however, until it gets published (or rejected for this reason) on BYONDscape, it is basically still in my turf, and I will fix it when I get bored one day.

If its not ready yet to be teaching people new to these concepts you shouldn't be flashing around the URL until it is :P. It's best to have people who know what they are doing proof-read it and provide feedback before you give it to people who can't tell what is good learning material or not. And everyone myself included has problems and occasional misconceptions about how things work so it's always good to get a second opinion from someone knowlegeable on the topic.
In response to Jon88
Unfortuantely I don't think there are many tutorials that really teach that. I know A Step BYOND does, but it's kind of advanced for newbies just starting out. Besides, Kunark's usage of usr absolutely pales in comparison to that of "Your First World". Hopefully someone will update it someday.

After scanning through the small set of tutorials availible it looks like many of them use usr when it can be avoided. Even if they work in the cases that are provided usr really shouldn't be used so the verb is safe to be called from elsewhere.
In response to Theodis
You know your making yourself out to be childish with this whole "Well I knew how to do it right, but I just wanted to teach new people a good use of usr in procs thing." thing to defy Lummox JR's blanket statment. Lummox JR knows what he's talking about but as far as I'm concerned usr should be avoided as much as possible and verbs that require it should be short one liners that just call another function passing usr as a parameter to a proc that handles all the work. That way if you ever need to force the action on the play you can always call the proc. And if a verb doesn't require it(like commands owned by the player and call by the player) then you shouldn't use usr so you have verbs which are safe to call from procs.


Childish?! I have fixed the stupid tutorial because of this like 3 times without fighting back! And did you not notice that I made it ~two years ago?! I havent touched the stupid proc in two years! It's not like I would make the same mistake again. I am not being childish. I am simply getting very, very annoyed whenever someone brings it up. I don't just get some feedback on my forum, I try to help a newbie and I get "Don't post that piece of crap on this forum... It uses usr in a procedure!" Big friggen deal! If you want to give me suggestions post it in my forums, don't piss me off by posting smart remarks when I decide to be helpful for once in a long while. Maybe then I will be an angel and fix my tutorial. By the way, that isn't saying to go report it, sicn ei already know. I am jsut saying, in the future, if anyone has a problem, take the liberty of giving me a post in my forum explaining the problem, instead of complaining about it 10 stories up in a post in newbie central.
Page: 1 2