SRL Archive - MSI Suggestions

procedure MSI_SetRev;


marpis

2010-07-26 06:22:54

In Debug.scar

{******************************************************************************}
{ procedure MSI_SetRev; }
{ By: Rasta Magician & Shuttleu }
{ Date: 24 July 2010 }
{ Description: Retrieves the user rev of MSI and sets it to var MSIRev }
{******************************************************************************}
procedure MSI_SetRev;
var
i: Integer;
s: string;
begin
i:= OpenFile(ScriptPath+'.svn\entries', True)
ReadFileString(i, s, 20);
CloseFile(i);
MSIRev:= Trim(Between('dir', 'http', s));
end;

Tried running the powerminer to test if my object record ROCK_COAL works, but ran into this:


OpenFile - Exception. Could not open file: C:\Users\Matias Blomqvist\Documents\SIMBA\Simba\Scripts\.svn\entries
Error: Exception: Invalid FileNum passed: -1 at line 29

Shuttleu

2010-07-26 06:42:53

can you check if the file C:\Users\Matias Blomqvist\Documents\SIMBA\Simba\Scripts\.svn\entries exists for you?

~shut

Wait, of course that wont work
you need to run the RunMe.scar in the msi folder, dont copy the file anywhere, run it from the MSI folder

Shuttleu

2010-07-26 08:07:31

It needs to be changed to
AppPath +'Includes/SRL/SRL/MSI/.svn/entries'

~shut

Gu3st...

2010-07-26 08:20:08

From: Shuttleu
It needs to be changed to
AppPath +'Includes/SRL/SRL/MSI/.svn/entries'

~shut
What if the user has their include folder in an other place?

IncludePath + 'SRL/SRL/MSI/.svn/entries' would be better

Coh3n

2010-07-27 19:46:00

There should probably be a try..except statement in the function anyway…

E: Fixed.