Sir R. M8gic1an
2011-01-23 23:45:52
MSI is a community project, therefore everything gets added as long as it works.
As MSI is MSI, we'll be using the tracking system to keep a certain level and track of how good the functions are working.
This is what the tracking system looks like:
Every function that interacts with RS needs to have this.
eg: Object finder
— Objects Found
to be implemented:
suggestion for debug:
Keeping it in a global area / var and printing it at chosen times.
This would also allow the system to avoid unnecessary debugs, which it currently has.
here's a first thought:
I'm going to tie the debugging and the tracking system together.
Also, the debugging system will look much cleaner.
It just makes sense to print the tracking records alongside the debug.
And I also need sleep and to figure out some patterns before I can actually write this ;)
RULES
~RM
As MSI is MSI, we'll be using the tracking system to keep a certain level and track of how good the functions are working.
This is what the tracking system looks like:
Ine ] ------------ MSI_Track Object
[ Ine ] -------------- ~ Track Record
[ Ine ] -------------- ~ ~ TrackObject
[ Ine ] -------------- ~ ~ Searches: 99
[ Ine ] -------------- ~ ~ Successes: 81
[ Ine ] -------------- ~ ~ Success %: 81
Every function that interacts with RS needs to have this.
eg: Object finder
— Objects Found
to be implemented:
type
TTrack = record;
tID, tConst: integer
tName: String;
tSearches, tFinds: integer;
//tCustom: TStringArray;
//TCustomR: TIntegerArray;
var
MSI_Track: TTrack;
tL: integer; //sometimes you are just better off using tL than calling length() all the time.
//Track_Start allows you to use a constant integer to keep track of your function. Else it'll return a chosen integer to you.
procedure Track_Start(var ID: integer; Name: String);
begin
Inc(tL);
SetLength(TrackRecords, tL);
tID := tL - 1;
if ID = 0 then
tConst := tL - 1
else
tConst := ID;
{
tCustom := copyArr(Custom); //not sure if CopyArr exists, but it should
SetLength(tCustomR, Length(tCustom));
}
tName := Name;
ID := tConst;
end;
//to track success rate
procedure TrackR(ID: integer; Success: boolean);
//to track custom setting's rates
procedure TrackC(ID, which: integer)
//to find the index of your custom Track Record
//mID = main ID
function FindCustomTrackID(mID: integer; subName: String): integer;
var
i: integer;
begin
for i := 0 to High(MSI_Track[ID]) do
if subName = MSI_Track[ID].tCustom[h] then
break;
if i > High(MSI_Track) then
Result := 0
else
Result := i;
end;
function PrintTrackRecord: boolean;
//let's do it RM Style.
if (FindCustomTrackID(RM_TRACK, 'MSI style') > 1)and(PrintTrackRecord) then
MSI_Debug('This shit sounds good');
suggestion for debug:
Keeping it in a global area / var and printing it at chosen times.
This would also allow the system to avoid unnecessary debugs, which it currently has.
here's a first thought:
dbg_count: integer;
sub_count: integer;
//we'll actually make this automatic cus it makes sense that way.
I'm going to tie the debugging and the tracking system together.
Also, the debugging system will look much cleaner.
It just makes sense to print the tracking records alongside the debug.
And I also need sleep and to figure out some patterns before I can actually write this ;)
RULES
- Your shit must compile
- post all the files that were changed
- respect author notes
- document your code
- Post a thread with your code and explanation of what it is
- Code must be Debugged and Tracked with MSI's Systems
~RM