Talk:CommandFly

From Dragon Age Toolset Wiki
Jump to: navigation, search

This is a pretty good example function for my next suggestion so I'll put it here. Almost every function page I've seen so far fails to specify what the valid range of parameters is and what is returned or how the function handles those situations where values passed in are outside the valid range.

In this particular function, for instance, it is not clear at all what will happen if an invalid location is passed in. Or a location falling outside all area boundaries (e.g. negative coordinates). Will it return an invalid command, or will it return a valid command which will fail because it trys to fly the creature to an invalid or unsafe location. This is especially important when a location is involved because they can be valid yet unsafe.

I probably shouldn't suggest this because I'm sure you'll hate it this late in the game but... All wiki pages for functions accepting parameters need to be updated to specify what the legal and illegal values are for every parameter and, if appropriate, what each value in the legal range means. The "Description" &/or "Remarks" sections must clarify what to expect when out-of-range parameters are supplied. Note this can, albeit rarely does, mean the function behaves differently depending on which parameter(s) is faulty. And those differences must be laid out as well when they exist. The "Returns" section must describe what is returned when the parameters are out-of-range as well as what is returned when they are legal. Void returning functions must state what happens when out-of-range parameters are supplied. -- Axe Murderer 13:33 PST 24 Oct 2009