ID:1664571
 
(See the best response by GhostAnime.)
var n = input("The current year is: [year].", "Set Year", "") as null | num


For the 'as null | num' part, what exactly are those two things? I think they're supposed to be type and list but null is a type? num is a list? I'm not sure how this works exactly.
Best response
The null tells DM to add a cancel button to the input() - which returns null when clicked.

The num part is telling input() to expect a numerical entry (and changes its style to the numerical form...)

If you want a cancel button while making a choice from a list, the argument would be as null|anything in [list].

The | is known as a binary-OR. The options are in binary and this could be thought as "combining" the options. (For more on bit operations/flags, please see this article).

For other options, please view the arguments (verb) entry.
When you say it returns null, does that mean for that input var n will be null? Or null as in it completely cancels the proc.
You could easily tested it yourself and see what happens. Don't be afraid to try things out:
mob/verb/Test()
usr << "Pick a number from 1 to 10"
var
N = input("What number?", "#", 0) as null|num
R = rand(1,10)
usr << {"You chose "[N]". The value was "[R]". You were [R==N?"":"in"]correct."


But to answer your question, n will be null when the cancel button is clicked AND the procedure continues as normal (hence why you should verify if a number was entered using things like isnum())
I used the current code I was using to test it after reading your post but didn't refer to the code I had first. I saw I had an isnum() check which is why the year didn't change to null, don't know where I picked up using isnum().