Numbered Steps to Reproduce Problem:
1) Use below code.
2) See "Cannot create objects of type null" runtime error instead of something useful.
Code Snippet (if applicable) to Reproduce Problem:
mob/verb/Break()
new "/obj"(loc) // works, strings are converted to paths when needed, which is good.
new "/obj/nonsense" // Useless runtime error.
This becomes especially problematic in places where you're saving and loading data and the runtime points to a generic line that works 100% fine for everything else. It's also impossible to actually add a check to see if this'll work, you have to try/catch it, but it's better to actually fix the problem by having a descriptive runtime tell you what type is failing.
Expected Results:
"Cannot create objects of type /obj/nonsense"
Actual Results:
"Cannot create objects of type null"
Does the problem occur: Anytime you use an invalid type anywhere a valid type is expected, places where you turn strings into types are the easy ones to find.
Every time? Or how often? Every time.
In other games? Yep
In other user accounts? Yep
On other computers? Yep
When does the problem NOT occur?
It's a runtime error thing, it's something you either avoid or don't.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Has been this way for at least 10 years, but I recall it being this way when I started.
Workarounds:
Use valid types! There's no soft-code way to determine if a type is valid or not, just whether it's a type or not.