SRL Archive - Research & Development Lounge

Procedure LoadSmart2;...Is this ok?


Dracody

2009-02-14 15:37:55

Well This works fine for me :)


{*******************************************************************************
Procedure LoadSmart2;
by: Dracody
Description: Loads smart world by looking at the prefix and parameters
at worlds.ini.
*******************************************************************************}
const
worldNumber = 68;

procedure LoadSmart2;
var
prefix: string;
url : Array of String;
begin
begin
begin
prefix := ReadINI('world' + IntToStr(worldnumber), 'Prefix', AppPath + 'includes\SRL\SCSS\worlds.ini');
url := strToStrArrayEx(ReadINI('world' + IntToStr(worldnumber), 'URL', AppPath + 'includes\SRL\SCSS\worlds.ini'), '/');
if(prefix = '')then
begin
writeln('Invalid world number or corrupted world list. Please review your settings');
TerminateScript;
end;
writeLn('Loading SMART.... Hang on.')
SmartSetup(url[0]+'//'+url[2]+'/', 'plugin.js?param=' + url[3]);
end;
end;
end;

Da 0wner

2009-02-15 03:38:15

So we can't pick world or anything?

Dracody

2009-02-15 12:06:22

From: Da 0wner
So we can't pick world or anything?


Of course you can, there is supposed to be a constant where you put it , lemme do a little edit. :(

Da 0wner

2009-02-15 17:18:31

Oh const WorldNumber..I see :p.

Nava2

2009-02-23 22:19:33

MY EYES BURNNNNNNNNNN

Standards bud. Use em ;)

Da 0wner

2009-02-23 22:28:51


{*******************************************************************************
Procedure LoadSmart2;
by: Dracody
Description: Loads smart world by looking at the prefix and parameters
at worlds.ini.
*******************************************************************************}
const
worldNumber = 68;

procedure LoadSmart2;
var
prefix: string;
url : Array of String;
begin
prefix := ReadINI('world' + IntToStr(worldnumber), 'Prefix', AppPath + 'includes\SRL\SCSS\worlds.ini');
url := strToStrArrayEx(ReadINI('world' + IntToStr(worldnumber), 'URL', AppPath + 'includes\SRL\SCSS\worlds.ini'), '/');
if prefix = '' then
begin
writeln('Invalid world number or corrupted world list. Please review your settings');
TerminateScript;
end;
writeLn('Loading SMART.... Hang on.')
SmartSetup(url[0]+'//'+url[2]+'/', 'plugin.js?param=' + url[3]);
end;

??

Also, what is the extra begins at the beginning for?!

Quickmarch

2009-02-24 10:10:47

What is the point of this procedure? SmartSetupEx?

Dervish

2009-02-24 13:51:26

From: Da 0wner

{*******************************************************************************
Procedure LoadSmart2;
by: Dracody
Description: Loads smart world by looking at the prefix and parameters
at worlds.ini.
*******************************************************************************}
const
worldNumber = 68;

procedure LoadSmart2;
var
prefix: string;
url : Array of String;
begin
prefix := ReadINI('world' + IntToStr(worldnumber), 'Prefix', AppPath + 'includes\SRL\SCSS\worlds.ini');
url := strToStrArrayEx(ReadINI('world' + IntToStr(worldnumber), 'URL', AppPath + 'includes\SRL\SCSS\worlds.ini'), '/');
if prefix = '' then
begin
writeln('Invalid world number or corrupted world list. Please review your settings');
TerminateScript;
end;
writeLn('Loading SMART.... Hang on.')
SmartSetup(url[0]+'//'+url[2]+'/', 'plugin.js?param=' + url[3]);
end;

??

Also, what is the extra begins at the beginning for?!


Although it may not be the case now, I use them to help me script.