Blockland Forums > General Discussion

Why are Certain Sections of Code spaced out?

Pages: (1/1)

Becquerel:

For example

--- Code: ---datablock fxDTSBrickData (brickCheckpointData){
brickFile = "Add-Ons/Brick_Checkpoint/Checkpoint.blb";

specialBrickType = "Checkpoint";

orientationFix = 1;

canCover = false;

category = "Special";
subCategory = "Interactive";
uiName = "Checkpoint";
iconName = "Add-Ons/Brick_Checkpoint/Checkpoint";

   indestructable = true;
};
--- End code ---
You see the lines "brickFile" through " indestructable"?
Why are they spaced out from the left margin? Is it required, or is it just easy to read Asthetics?

Sulfate:

it's all about style. easier to read. notice how all things handling category/uiname are together - that's not a coincidence.

on a side note, people that code like{
     this
}

piss me off as opposed to
{
     this
}

but that's just me being picky!

jes00:

I'm pretty sure you could even code it like this if you so desired:

--- Code: ---datablock fxDTSBrickData (brickCheckpointData){ brickFile = "Add-Ons/Brick_Checkpoint/Checkpoint.blb"; specialBrickType = "Checkpoint"; orientationFix = 1; canCover = false; category = "Special"; subCategory = "Interactive"; uiName = "Checkpoint"; iconName = "Add-Ons/Brick_Checkpoint/Checkpoint"; indestructable = true; };

--- End code ---
So organizing it is so the scripters can read it better.

Mr.jacksaunt:

I'm taking a Flash class, which is sorta like Torque, and the teacher says that tabs are required for adding a "datablock" (in Flash its called something else but i forget).
Like whenever that datablock is triggered, those certain variables are triggered aswell.

But looking at the code, there is only one { and one }; so that throws away what i was talking about.

Treynolds416:

Torque ignores all whitespace (new lines and tabs and etc.) so I could have 80 empty lines in between code lines and the functionality would not change.

Pages: (1/1)

Go to full version