Stupid Question about indention
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Stupid Question about indention
How important is it?
I kind of know because some parts of my last scenario didn't work until I fixed it... I noticed that the odd number columns seem to be where it's at, but if I use regular tab indents will they work? Is it important that they are aligned, not in which column they're located?
I kind of know because some parts of my last scenario didn't work until I fixed it... I noticed that the odd number columns seem to be where it's at, but if I use regular tab indents will they work? Is it important that they are aligned, not in which column they're located?
America-- Land of the Free, home of the Brave! "And now that we've taken care of the Braves we're coming after the Free."
"BANNED!!! What the hell do you mean BANNED? All I did was call one narrow-minded, power-hungry Nazi moderator a narrow-minded, power-hungry Nazi!"
"BANNED!!! What the hell do you mean BANNED? All I did was call one narrow-minded, power-hungry Nazi moderator a narrow-minded, power-hungry Nazi!"
Re: Stupid Question about indention
Indentation is purely for readability and should never cause any problems. I always use tab indent and it always worked. If there are any problems, the error lies probably somewhere else (like linebreaks).
Co-Creator of The Fellowship of the Clay (BfW 1.10) ~~ Maintainer of the German Code of Conduct
How to isolate problematic WML code ~~ WML error messages and their reasons
How to isolate problematic WML code ~~ WML error messages and their reasons
- battlestar
- Posts: 690
- Joined: January 1st, 2007, 7:12 am
Re: Stupid Question about indention
Readability is for when you run into an error and have to go through the code, and when you show other ppl your code for the purpose asking questions and teamwork projects. It's pretty important, like having the right punctuation and paragraph breaks in writing essays.
LUA: Llama Under Apprenticeship
Hell faction: completed
Hell faction: completed
- Simons Mith
- Posts: 821
- Joined: January 27th, 2005, 10:46 pm
- Location: Twickenham
- Contact:
Re: Stupid Question about indention
Consistent indentation helps avoiding errors, too.
Code: Select all
[event]
[filter]
side=1
[not]
[filter_location]
x,y=20
radius=3
terrain=!,*^V*
[/filter_location]
[/filter]
[message]
speaker=narrator
message=_ "Consistent indentation helps avoiding errors, too"
[/message]
[/event]
Code: Select all
[event]
[filter]
side=1
[not]
[filter_location]
x,y=20
radius=3
terrain=!,*^V*
[/filter_location]
[/filter]
[message]
speaker=narrator
message=_ "Consistent indentation helps avoiding errors, too"
[/message]
[/event]
# Oh wait! The indentation level of [/event] doesn't match that of [event]? Something must have gone wrong here!
Re: Stupid Question about indention
Good example... /not !
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."