SRL Archive - MSI Archives

MSI Scripting Standards


Sir R. M8gic1an

2009-09-09 23:32:11

The "official" tutorial thread can be found here. Please post any comments/suggestions on that thread.

Thanks,
The MSI Team

Coh3n

2009-09-10 19:12:37

From: Rasta Magician

That is all I can think of for now, if you have any suggestions/questions go ahead and post :) I will want to see these standards applied in every single piece of code that goes into the MSI SVN.


Lol, I'm already incorporating them into my personal scripts because I like it so much. :)

Dgby714

2010-04-18 07:03:34

From: Rasta Magician


- Use Scar Scripting standards.


~RM


hmmm, I see lots of non-lowercase bold words….

Gu3st...

2010-04-18 07:31:12

From: Dgby714
hmmm, I see lots of non-lowercase bold words….
I don't think that's a part of the SCAR Scripting standards?

Coh3n

2010-04-18 12:35:26

From: Dgby714
hmmm, I see lots of non-lowercase bold words….

Yeah, well unless you want to go through every MSI file and change all the bold words, and then convince Naum/marpis to not capitailize them, we'll have some words capitalized and some not. :p

MylesMadness

2010-04-18 12:46:16

Capital bold letters is win

Dgby714

2010-04-18 20:08:44

From: Coh3n
Yeah, well unless you want to go through every MSI file and change all the bold words, and then convince Naum/marpis to not capitailize them, we'll have some words capitalized and some not. :p


i got a php script somewhere around here that will check the files =)

Ejjman

2010-04-18 21:18:39

From: MylesMadness
Capital bold letters is win


http://www.kaitnieks.com/scar/scriptingsta/

Not exactly ;)

Coh3n

2010-04-18 21:26:45

From: Dgby714
i got a php script somewhere around here that will check the files =)

To be honest, I think it's useless to go through and change everything. It's the way they choose to script and they can do what they want. Capitalizing bold words is the last of my concerns when it comes to our standards.

Naum

2010-04-19 15:40:22

A while back, I made this header generator (just found it in my folder. lol):

Program MSI_TagGenerator;

Const
Typ = 'Function'; //'Function' OR 'Procedure'
Name = 'MSI_OpenBank(Bank, tPin : String) : Boolean;'; //The params + name
By = 'NaumanAkhlaQ and NCDS'; //Who is it made by?
Rev = '22'; //What Rev?
Datex = '25 Oct 09'; //The date it was created.
Description = 'Opens a bank using the best openers first.'; //The description

Var
Strings : Array [0..6] Of String; //Stores the Info
Space : Byte;
Begin
Space := 80;

Strings[0] := '{'+ Replicate('*', 80) +'}';
Strings[1] := '{ '+ Typ +' '+ Name;
Strings[2] := '{ By: '+ By;
Strings[3] := '{ Rev: '+ Rev;
Strings[4] := '{ Date: '+ Datex;
Strings[5] := '{ Description: '+Description;
Strings[6] := '{'+ Replicate('*', 80) +'}';

WriteLn(Strings[0]);

WriteLn(PadR(Strings[1], Length(Strings[1]) + (Space - Length(Strings[1]))) +' }');
WriteLn(PadR(Strings[2], Length(Strings[2]) + (Space - Length(Strings[2]))) +' }');
WriteLn(PadR(Strings[3], Length(Strings[3]) + (Space - Length(Strings[3]))) +' }');
WriteLn(PadR(Strings[4], Length(Strings[4]) + (Space - Length(Strings[4]))) +' }');
WriteLn(PadR(Strings[5], Length(Strings[5]) + (Space - Length(Strings[5]))) +' }');

WriteLn(Strings[6]);
End.

I also made one which does the headers for the beginning of the file. I'll see if I can dig that one up..

noidea

2010-04-19 21:42:10

From: Coh3n
To be honest, I think it's useless to go through and change everything. It's the way they choose to script and they can do what they want. Capitalizing bold words is the last of my concerns when it comes to our standards.


+1.
It is bullshit to expect every one to code the same.
Some one could be an epic coder with their own style, but if they're forced to use these 'standards' they could be thrown off guard and end up with a bad product.

As long as it contains the proper spacing rules, it's pretty readable.