since i don't frequent the GMC anymore or yoyogames i'd figure i ask here
why this no work if (heal_step=0) {
heal_number=-1;
i=0;
for (i=0;i>=6;i+=1) {
if (slot[i+1,0]!=0) { // meaning in slot i, is there a species sitting there?
heal_number+=1;
} else { // if there isn't, end the loop
i=6;
}
show_message("hey look at me i work");
}
heal_monitor=0;
heal_ball_number=0;
draw_heal_animation=true;
heal_counter=30;
show_message(string(heal_number));
}
for (i=0;i>=6;i+=1) {
if (slot[i+1,0]!=0) { // meaning in slot i, is there a species sitting there?
heal_number+=1;
} else { // if there isn't, end the loop
i=6;
}
show_message("hey look at me i work");
}
Curly braces in game maker are so annoying, you start off writing
if (blah) {you then have to either put a}on the next line and go back up or //write something inside curly bracketsand then the { is left open until you get down to }goddamn that pisses me offedit: ok I started looking how to actually do this properly because it annoys me so much. so far my best method is:press F2, 2, write the condition, ctrl+down, ctrl+down, ctrl+right, ctrl+del, write the statement@Toast: I am very spoiled by VS2013 where it does all of that for you.
I used to write the brackets in the same line before I got used to the extra line. It looks better when nesting and indenting in my opinion. The same line is standard for javascript.However, the standards for PHP and C# (and other languages) is to do it in this formatMy IDE corrects it to the way I like it with auto-format.
Standards only matter if you're working in a team. They're easy to adjust to if you ever need to join an existing project in the future. If you're the only one actively using the code, and a particular coding standard works for you, then by all means continue using it.
I don't believe anyone asked for a crash course and this isn't really helpful to Reidd. Don't force your standards on someone else, that's exactly what snobby programmers do. They are also the ones who say "Everyone else is doing it wrong and only my way is right." And then they rewrite the entire program and two months later, the code looks slightly prettier and nothing new got done.Polyman's feedback, on the other hand, is helpful. More so than telling someone their brackets are in the wrong place.Also, VS2013's new auto-formatting is incredibly annoying to me because it assumes that when I want to add a new bracket around an existing section (such as adding a new condition), it needs to close it immediately instead of letting me decide where that section ends. And then it starts fucking up my indentation and no one is happy.@Alert Yeah I was talking about game maker specifically. I have Sublime Text 2 and use it for most things, it's rather good. Game maker is rather not good
On the contrary, it helps when developers discuss their preferences and reasoning behind them. Regardless, perhaps I should have said that if you are going to program in one of those languages, that is the suggested standard.
I guess it doesn't really matter because you can auto format a whole document before working on it anyway. As long as you indent properly either way is readable.I like the auto-formatting cause I can code the same was as reidd here and VS will format it to 'standard' for me automatically. But anyway… Yeah GM better fix their shit before I make a better code editor for it or somethingAw Steve, I meant no harm and it looks like Reidd appreciated the help. I don't think of these as stupid mistakes – in fact reidd's workarounds are pretty clever. Having someone read/nitpick over your shoulder is indeed annoying, that I can understand
Reidd, you're thinking of the right person. I played a select few games growing up, and continue to not play many games as an adult ;)I find that making mistakes is the best way to learn the inner workings of WHY you do things a certain way. When everything is working, it just works, and it is harder to grasp exactly how it does.