PDA

View Full Version : CheckSRL;



mat_de_b
09-02-2007, 01:48 PM
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
09-02-2007, 01:56 PM
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
09-02-2007, 01:59 PM
It opens a webpage to the Download SRL section of the forums and what do you mean by proggys?

ShowerThoughts
09-02-2007, 02:05 PM
of script its putted in a script you know..that proggy,s;)
and yes opens the website

cathering_
09-02-2007, 03:25 PM
The 'OpenWebpage' only works if there is a default browser

Sumilion
09-02-2007, 03:40 PM
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
09-02-2007, 03:56 PM
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 www.srl-forums.com to get latest version.');
end;
end;

Sumilion
09-02-2007, 03:58 PM
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
09-02-2007, 04:02 PM
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
09-02-2007, 05:05 PM
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
09-02-2007, 05:21 PM
i know :redface:

stupid:duh:

Sumilion
09-02-2007, 05:23 PM
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
09-02-2007, 05:44 PM
Yeh, in Globals there is a variable with the version number in it, which is what i was asking

the scar noob
09-02-2007, 05:46 PM
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
09-02-2007, 10:12 PM
But 4.0 is the last version, correct? So, this isn't needed at all.