ID:135379
 
(Bold demos have been fixed)

http://developer.byond.com/hub/Rifthaven/A.I.Code - usr in AI procs
http://developer.byond.com/hub/ADDiCt/MacroDemo - usr in Login(), usually safe, but not good.
http://developer.byond.com/hub/Cable/Mini-GamesDemo - Though the proc usr is used in is only called by a verb, it still is a bad practice.
http://developer.byond.com/hub/Threefours/Mouse - usr in Login() again. Also, it should explain that usr is proper in mouse-related procs because they are essentially verbs called in a different manner.
http://developer.byond.com/hub/Nadrew/NadrewsLevelingSystem - usr in AI procs
http://developer.byond.com/hub/Nadrew/NadrewsWeaponSystem - Same as above (also bad equipment system)
http://developer.byond.com/hub/Nadrew/ NadrewsWeightandSpeedsystem - usr in Login(), goto.
http://developer.byond.com/hub/KrosTrikare/NewbieGame - See above. EVERYTHING above.
http://developer.byond.com/hub/GoodDoggyTreat/PaintingDemo - usr in Login() again.
http://developer.byond.com/hub/KitKate20/PettingZooDemo - This one deserves first prize. Almost every line of every proc has usr on it.
http://developer.byond.com/hub/Hanns/PinBanks - usr in Login() and, worse, Logout()
http://developer.byond.com/hub/RaeKwon/RaeKwonTextDemo - usr in Login()
http://developer.byond.com/hub/RaeKwon/RandomCombat - usr in Enter(), lots of other places.
http://developer.byond.com/hub/Wall04/SelectionDemo - usr in Bump().
http://developer.byond.com/hub/Buzzyboy/ShadowDemo - usr in Move().
http://developer.byond.com/hub/ShunDi/ShunDisSkillsDemo - Terrible modification on a terrible (and now fixed) tutorial.
http://developer.byond.com/hub/Scoobert/SkillGain - usr in Login()
http://developer.byond.com/hub/Xooxer/SlotMachineDemo - usr in Login()
http://developer.byond.com/hub/Sariat/Sound - usr in Entered() and related procs.
http://developer.byond.com/hub/Dan/Source.NightMud - usr in a proc called by Login() (OH YES, I WENT THERE!)
http://developer.byond.com/hub/Tapion1/TapsNPC - usr in Login(), and Login() is overridden twice by the same type.
http://developer.byond.com/hub/Jotdaniel/StatMeters - usr in Stat(). Also usually safe, but not always.
http://developer.byond.com/hub/Hanns/Vehicles - usr in Move(), Login()
http://developer.byond.com/hub/Air_King/Vehicle_Movement - usr in Login()
http://developer.byond.com/hub/GuardMaster/ Zelda-LikeBattleSystem - usr in AI procs.
http://developer.byond.com/hub/Rifthaven/A.I.Code - usr in AI procs.
http://developer.byond.com/hub/Rcet/AgingDemo - usr in procs.
http://developer.byond.com/hub/AlKaiser/Alks-Bank_Code - usr in Login() and Stat()
http://developer.byond.com/hub/UnknownPerson/ AllAboutIconsDemo - usr in Login()
http://developer.byond.com/hub/Spuzzum/AlternateShopKeeper - usr in procs.
http://developer.byond.com/hub/Spuzzum/ArmourSystem - usr in procs.
http://developer.byond.com/hub/Nick231/BankDemo - usr in Stat(). Also some bad syntax with "set src".
http://developer.byond.com/hub/GreenLime/BuildingDemo - usr in Login().
http://developer.byond.com/hub/Griswald/CharacterHandling - usr in procs, Login().
http://developer.byond.com/hub/Winbiko/ChatSystem - usr in Login(), Stat().
http://developer.byond.com/hub/Vortezz/ClassSelection - usr in Login().
http://developer.byond.com/hub/Polatrite/GraphicalMUDKit - usr in Login(), Logou(), and in AI procs. Too long for me to look further into it, though.
http://developer.byond.com/hub/Dession/GuildDemo - usr in AI procs (commented out, but meant to be used).
http://developer.byond.com/hub/Dantom/HubfilesDemo - usr in Login() (DOUBLE WHAMMY!).
http://developer.byond.com/hub/Super16/ItemStorage - usr in Enter().
http://developer.byond.com/hub/Buzzyboy/ItemStacking - usr in Login(), and it JUST PLAIN SUCKS.



Not improper usr usage, but...:
http://developer.byond.com/hub/GreenLime/OverLayerEffects - Assumes argument in Entered() is a mob (will cause runtime errors).
http://developer.byond.com/hub/Volte/PasswordLogin - goto
http://developer.byond.com/hub/LordofWater/VisualProc - Excessive colon usage.
http://developer.byond.com/hub/Sariat/Donation - Doesn't work now.

How the hell would I know?:
http://developer.byond.com/hub/sapphiremagus/Language_Demo - Failure to unzip.
http://developer.byond.com/hub/unimatrix/planning - His server is down, apparently.
http://developer.byond.com/hub/LilTrunks/RPGStarter - Not much of a starter if there's no code. Of course, judging by the trend of these, I'd say it uses usr improperly.
http://games.byond.com/hub/Zilal/SheepIIIRhodes - Failure to unzip.






Whew!

Remember, these are only errors that are causing problems with newbies. People are lucky I didn't crack down on using usr in verbs where src would be more appropriate and more flexible (as in when someone else is calling your verb).
We all knew this day would come.

PS: thanks, I just fixed my usr-less usr demo. (Grr Garthor is strict enough to call my demo usr-full because of input(). >=O )
In response to Unknown Person
I never said it was full of improper usr usage, just that it had it.

Oh, you also should increase the version number.
Well, I changed the usr in Stat() bit with the bank demo, but I'm confused about "Also some bad syntax with "set src"." Only change I could think of changing was "set src in oview(3)" to "set src in oview(3,src)", which doesn't work.
In response to Nick231
I meant that the "set src" in one of your verbs came after an input(), which compiles, but gives the impression that you can have something along the lines of "if(whatever) set src in oview(1) else set src in oview(2)"
In response to Garthor
Ah, It's fixed now, but I probably never would have cought that otherwise, thanks.
Thanks for the reports, I'll fix mine up as soon as I can.
One minor note there: usr is actually quite valid in Stat().

Lummox JR
In response to Lummox JR
One minor note there: usr is actually quite valid in Stat().

Though it's probably best to know that in the case of Stat() usr is the person viewing the statpanel which may not be the same as the atom being viewed.
In response to Theodis
Which was my point, though I should've been more thorough in explaining it. I guess if I was going to point out using usr in Stat(), I should've pointed out using usr in verbs belonging to src as well. In general, however, if you're going through the trouble to view another object's stats, then you probably do not want to see your own. And, as usual, using usr everywhere gives newbies the impression that it's the magic word when it comes to whatever you want.
Just a question sort of relating. If a demo has a virus in it is that bad in the sense of deletion of hub
In response to Garthor
I don't quite understand this hatred of usr, sure it's a bad idea in procs, but Login() is just fine, and many situations, such as Click(), it's downright neccessary. I'm not changing it.

~X
In response to Xooxer
It's not always fine in Login. It's only semi-safe.

I think doing something like:
mob/HostVerb/verb/Restart()
for(var/mob/M in world)
if(M.client)
M.Login()
//do whatever else to 'restart' the world


Doing something like that to restart the game without rebooting, and if you have usr in Login, won't usr refer to whoever used the Restart() verb?
In response to Xooxer
All I found in my leveling system was that I didn't have enough whitespace, it's ugly. But the code itself is just fine, I only use usr in Click() and in verbs, where it is valid. As for my other demos, sure those are nasty; I only made them three years ago, I'll fix those.
In response to Airjoe
Sure, the same is true for everything else, but I don't use it like that, my use is perfectly acceptable. It's a demo, after all, not a library that could affect, or be affected, by someone else's code.

~X
In response to Xooxer
Sure, the same is true for everything else, but I don't use it like that, my use is perfectly acceptable. It's a demo, after all, not a library that could affect, or be affected, by someone else's code.

Heh well there are many problems that crop up in newbie central that are based on poor source code in demos. Though demos don't have to be as robust as libraries they still shouldn't teach bad habits. So you shouldn't use usr where unnecesary anymore than goto or any of the other discouraged programming habits.
In response to Theodis
Theodis wrote:
Sure, the same is true for everything else, but I don't use it like that, my use is perfectly acceptable. It's a demo, after all, not a library that could affect, or be affected, by someone else's code.

Heh well there are many problems that crop up in newbie central that are based on poor source code in demos. Though demos don't have to be as robust as libraries they still shouldn't teach bad habits. So you shouldn't use usr where unnecesary anymore than goto or any of the other discouraged programming habits.


Well, with the exception of ZBT (Zilal's Beginner Tutorial) All of the tutorials have usr errors except for BYOND Basic Savefiles which just uses prompt() (which was phased out). The first step should be to fix the tutorials and stop newbies from making the mistakes to begin with.
In response to Xooxer
Because while it's fine in Login(), src is even MORE fine. On top of that, like I said before, it gives newbies the impression that usr is the magic variable which reads your mind and is set to whatever you want it to be. It's the difference between saying "Look at that guy walking down the street" and "Look at the guy making that guy walk down the street." Ninety-nine times out of one hundred, you're the person making yourself walk down the street, but it's an obtuse way of saying things and can lead to confusion.
In response to Garthor
Then someone should just write an article that explains the whole thing.
In response to OneFishDown
Which has been done, and the problem persists.
Page: 1 2