Blockland Forums > General Discussion

How do you indent when you code?

Pages: << < (2/5) > >>

Doomonkey:


--- Code: ---function killPlayer()
     {
          Self Delete();
     }

--- End code ---
I don't know if you can tab the {s after a function in Torque, but if you can then that is how I would do it.

Reinforcements:

I usually do the first one unless I don't think it really matters or I'm feeling lazy at the moment, then I do the second one. Sometimes as I scroll through a script I'm working on, I'll actually fix it though ;)

Evar678:


--- Quote from: Doomonkey on November 17, 2012, 08:36:46 PM ---
--- Code: ---function killPlayer()
     {
          Self Delete();
     }

--- End code ---
I don't know if you can tab the {s after a function in Torque, but if you can then that is how I would do it.

--- End quote ---
Torque ignores whitespace, so yes you can do this.

Electrk²:

you press the tab key

TheBlackParrot:


--- Code: ---function stuff(%c)
{

%id = %c.bl_id;
echo(%id);

}
--- End code ---

i tend to space things out a bit

Pages: << < (2/5) > >>

Go to full version