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
Those pre-bracket tabs make me want to hurt things.
I used to code similarly to C, but that always ended up as an ungodly mess so now I do B.
I would do B.
As of recently I now do a mix of A and B like ludamad mentioned.
The reason why A was popular is because a lot of examples in GM were coded that way so I picked up on that. But now I indent after statements. It is easier to read.A mixture of A and B usually happens when I write.
*Walks in*
Oh, a programming discussion?*Walks out*