The N3rds
Would you like to react to this message? Create an account in a few clicks or log in to continue.

TalkingGoose - Learning Expression 2 - Lesson 1

Go down

TalkingGoose - Learning Expression 2 - Lesson 1 Empty TalkingGoose - Learning Expression 2 - Lesson 1

Post  TalkingGoose Sat Dec 18, 2010 11:57 pm

Tutorial 1 - Structure

One of the first things you will want to know is how to structure your code.

Messy code can be hard to read and debug. Comments and 'tabbed' structuring makes your code look better and allows people to see what is going on at each point in your code.

Below is an image detailing the things I am talking about.

TalkingGoose - Learning Expression 2 - Lesson 1 Tut1-A

Also, Make sure to comment your code well as it will help people understand (and help you remember) what things actually do.

Notice the 'tabbed' structure, The position of the () and {} brackets, and the blank lines between things. This helps with the readability of your code.

TalkingGoose - Learning Expression 2 - Lesson 1 Tut1-B

These things are very basic but even people which consider themselves "Advanced" forget to do these simple and helpful steps to ensure their code makes sense.

If there are any questions or help needed with these topics do not hesitate to contact me.

(P.S. The most helpful page ever for Expression 2, I still use it. :3 - http://wiki.garrysmod.com/?title=Wire_Expression2)

TalkingGoose

Posts : 1
Join date : 2010-12-18

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum