I like the new wiki, and I've added some info, but now I have some questions. My edit caused the function to run beyond the edge of its allotted box on a 1280-wide screen in FireFox3, so I put in a carriage return and added some white space to make it more readable, since Lua doesn't seem to care about white space within function calls. The function I did this to was
setControlHint().
My questions after making the change are:
1. For long functions like this, should we put in carriage returns, and if so, is there a characters-per-line limit we should go by, and should we put an ellipsis or something at the end of each broken line? If Lua has a line-continuation character, that might be good to use so people can copy+paste+edit more directly.
2. Is it okay to add white space like I did? I know some languages are very picky, and I'm new to Lua, but spaces don't seem to mess up my function calls.
3. If you refer to a function call in the text portion of a topic, should you write it like "myFunction", "myFunction()", or "myFunction(...)"? In my case, I put the ellipsis there since calling it without parameters crashes Aquaria. Not that it would have been very useful if it didn't crash, but still.
4. Should optional parameters be indicated somehow in the function line? For example:
setControlHint (string text, [boolean leftButton], [boolean rightButton], [boolean middleButton],
[number time], [string texture], [number songID], [number scale])
setControlHint (string text[, boolean leftButton[, boolean rightButton[, boolean middleButton[,
number time[, string texture[, number songID[, number scale]]]]]]])
5. Syntax highlighting would be nice, even just for indicating variable types, but I doubt it would be worth it to do it manually. If you're willing and/or able, there's something like
this that could be used, I think. If it's a pain to add or you don't want it in for other reasons, don't worry about it.