SRL Archive - Research & Development Lounge

CheckSRL;


mat_de_b

2007-09-02 09:48:53

A little function i thought of, should help clear up the forums abit and aid some noobs… might be useful to put in SetupSRL; else just call it at the start of the main loop




{*******************************************************************************
procedure CheckSRL(Current:string);
By: mat_de_b
Description:
(Currently "CheckSRL('4.00');")
Checks for the current version of SRL and
if it isnt current will kill the script and open
the download section of SRL
*******************************************************************************}


procedure CheckSRL(Current:string); // Currently 4.00
begin
if not(SRLVersionNumber = Current)then
begin
Writeln('/////////////////////////////////////////////////////////////');
Writeln('/////////////////////////////////////////////////////////////');
Writeln('');
Writeln('INCORRECT VERSION OF SRL');
Writeln('You have v '+SRLVersionNumber);
Writeln('Please Download SRL '+Current+' from');
Writeln('http://www.srl-forums.com/forum/download-srl-here-f145.html');
Writeln('');
Writeln('/////////////////////////////////////////////////////////////');
OpenWebPage('http://www.srl-forums.com/forum/download-srl-here-f145.html');
TerminateScript;
end;
end;

ShowerThoughts

2007-09-02 09:56:29

nice idea it should be a include like yours :p
ehm so there will be a link into it with a link to the newest srl and info how to install it with pics if there really stupid that would be great
and with a message always post progges and bugs from scripts/srl(has nothing to do with it)

great idea it should be added must! added ;)

mat_de_b

2007-09-02 09:59:43

It opens a webpage to the Download SRL section of the forums and what do you mean by proggys?

ShowerThoughts

2007-09-02 10:05:52

of script its putted in a script you know..that proggy,s;)
and yes opens the website

cathering_

2007-09-02 11:25:24

The 'OpenWebpage' only works if there is a default browser

Sumilion

2007-09-02 11:40:16

Let me sketch this for you :

When SRL 4.1 comes out, and i didnt download it, how will this procedure tell me my SRL 4.0 is out of date ?

the scar noob

2007-09-02 11:56:37

From: Sumilion
Let me sketch this for you :

When SRL 4.1 comes out, and i didnt download it, how will this procedure tell me my SRL 4.0 is out of date ?


yea, there is already one in the SetupSRL.scar, tehre's a http://.……. .txt file with current SRL version ;)

EDIT:
{*******************************************************************************
procedure CheckVersion;
By: Dankness
Description: Checks for Current SRL Version from Villu-Reborn.
*******************************************************************************}
procedure CheckVersion;
begin
Ver := GetPage('http://www.villu-reborn.com/srl/version.txt');
if ( Ver <> SRLVersionNumber ) then
begin
WriteLn('SRL Version ' + Ver + ' is now out.')
WriteLn('Please Visit [url]www.srl-forums.com[/url] to get latest version.');
end;
end;

Sumilion

2007-09-02 11:58:15

From: the scar noob
yea, there is already one in the SetupSRL.scar, tehre's a http://.……. .txt file with current SRL version ;)


Yeh thats what i was aiming at, cause his function isnt using it :)

(or did you expected to do that when the procedure is called)

And SetupSRL; is no more ;)

the scar noob

2007-09-02 12:02:07

From: Sumilion
Yeh thats what i was aiming at, cause his function isnt using it :)

(or did you expected to do that when the procedure is called)

And SetupSRL; is no more ;)


I know, i just still have SCAR 2.03 > SCAR 3.11 on my computer wit their own SRL's :)

mat_de_b

2007-09-02 13:05:39

My aim is that you were to put the current version as the string in check, becuase i didnt know there was that text file on the net

ShowerThoughts

2007-09-02 13:21:06

i know :redface:

stupid:duh:

Sumilion

2007-09-02 13:23:59

Yes but then you would know there is a new version :p

Without internet access a version check is … impossible :)

A question HAS to be asked to 'something' what the latest version is ..

mat_de_b

2007-09-02 13:44:59

Yeh, in Globals there is a variable with the version number in it, which is what i was asking

the scar noob

2007-09-02 13:46:10

From: mat_de_b
Yeh, in Globals there is a variable with the version number in it, which is what i was asking


that's the version of the SRl the 'user' has, not the latest :)

bullzeye95

2007-09-02 18:12:25

But 4.0 is the last version, correct? So, this isn't needed at all.