View Single Post
zarlor
Senior Member
 
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819

Old August 15th, 2014, 11:26 AM
Just a couple of tips. You can put your code into those boxes like I used by putting putting [ CODE ] (no spaces between the brackets and the word) and [ /CODE ] at the end (again, remove the spaces.) Also you'll note how I indented things? Obviously it works perfectly well without any indentation, but for readability it's kind of an old coder trick to indent stuff so it lines up with the earlier things it references. In the example above I've got the foreach starting at the beginning of the line, but since the "if" statment happens inside of the foreach loop I normally indent it. Same with the "eachpick" line since it's only doing something based on the "if" line before it. Then the endif, since it relates to that earlier "if" line is placed at the same amount of indentation as the "if" it belongs to and the same for that nexteach line. Not a big deal at all with something relatively short like that, but if you ever have to start nesting if statements inside of each other it can be easy to lose track of which endif goes with which if so indenting like that tends to help some. Thanks for sharing your findings!

Lenny Zimmermann
Metairie, LA, USA

Data files authored (please let me know if you see any issues with any of these if you have/use them):
Official (In the downloader)
50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome
Coming Eventually
Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me)
zarlor is offline   #34 Reply With Quote