HOW TO WRITE CODE?

Posted by Alert Games on April 1, 2012, 12:06 p.m.

How do you write code?

A:

if (this==statement) {
code = 1;
     if (this==another) {
     moar = 2;
     }
}

B:

if (this == statement)
{
     code = 1;
     if (this == another)
     {
          moar = 2;
     }
}

C:

if (this == statement)
{
code = 1;
if (this == another)
{
moar = 2;
}
}

Notice I put semicolons after every assignment, because it is good practice.

I also put "==", even though this isnt required in game maker, its required in other languages. Probably because you can assign variables within statements in other languages.

Personally I code in A, but i think the most legible and widely used is B.

What would be cool is if there was an option in game maker to clean their code up to standards, for learning purposes.

In other news, YOYOgames is starting to go bankrupt. Which i find hallarious.

heres the link: yoyogames

Comments

Alert Games 12 years, 7 months ago

Thats right LAR. Youre not welcome here.

Just make your graphics for us to use and keep out of our business.