Author Topic: change a player's node color when they get shot  (Read 3284 times)

if anyone formats their code like
Code: [Select]
function egg(%arg) {
if(%arg) {
doThing1();
return 5;
} else {
doThing2();
return -8;
}
}
i will find you

also i format the same way as shiftkitty except i put spaces between arithmetic operators and numbers/variables like %a + 2 instead of %a+2 for better visibility
« Last Edit: August 22, 2017, 02:02:43 PM by Gytyyhgfffff »

I prefer having the opening bracket be on its own line, but it depends on the language

in javascript you have to put the opening bracket on the same line if you want to return an object due to the handicapped automatic semicolon insertion

also i format the same way as shiftkitty except i put spaces between arithmetic operators and numbers/variables like %a + 2 instead of %a+2 for better visibility
for whatever reason, it's easier for me to read with less spaces. not sure why. i can imagine it being easier for most people with the spaces though.

I prefer having the opening bracket be on its own line, but it depends on the language

in javascript you have to put the opening bracket on the same line if you want to return an object due to the handicapped automatic semicolon insertion
example?
I don't remember javascript doing anything like that, or do you not put in semicolons?

example?

this doesn't work:

Code: [Select]
var doSomething = function ()
{
  return
  {
    "someKey": "hello"
  };
};

because it automatically puts a semicolon after the return statement


yeah this is a complete stuff of a mess i've deciced to restart everything and try again using actual tutorials
thanks for trying to help me people, much appreciated

if anyone formats their code like
Code: [Select]
function egg(%arg) {
if(%arg) {
doThing1();
return 5;
} else {
doThing2();
return -8;
}
}
i will find you

also i format the same way as shiftkitty except i put spaces between arithmetic operators and numbers/variables like %a + 2 instead of %a+2 for better visibility
uh dont check my github thanks