SRL Archive - S.M.A.R.T. Questions and Answers.

Upgrading a script to SMART


NickMystre

2012-01-22 14:17:11

Once you have your script working reliably after having done all the ground work, are their any adjustments you need to make to a script before it will run under SMART - besides having the skeleton below …

program SMARTskeleton;
{$DEFINE SMART}
{$i SRL\SRL.simba}
{$i ObjectDTM\ObjDTMInclude.simba}

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Member := True;
Players[0].Active := True;
Players[0].Pin := '';
end;

begin

Smart_Server := 10;
Smart_Members := True;
Smart_Signed := True;

ClearDebug;
SetupSRL;

ObjDTM_Setup;

DeclarePlayers;

if not (LoggedIn) then
LoginPlayer;
end.

Thank you!

Sir R. M8gic1an

2012-01-22 14:18:14

Nope, that should pretty much be it

-RM

NickMystre

2012-01-22 14:35:55

From: Iambubbleman


I'm a bit of a noob at this, when I try to run the script I get the following error message.

Exception in Script: Unable to find file 'ObjectDTM\ObjDTMInclude.simba' used from ''

If someone can help me fix this, I'd really appreciate it.


While I have none of the experience of many of this forums stalwarts, let me have a go at answering this.

ObjDTMInclude.simba is a Simba include written by euphemism. This is it's purpose …

This include contains procedures and functions to use and create Object DTMs. - euphemism


Unless your script makes use of Object DTM's - you can remove these two lines from your script.


{$i ObjectDTM\ObjDTMInclude.simba}

... and ...

ObjDTM_Setup;

How did I do ?

NickMystre

2012-01-22 14:41:24

From: Sir R. M8gic1an
Nope, that should pretty much be it

-RM


Hi RM, I appreciate the feedback. Thank you. Just putting the pieces of the Simba, SRL, SPS, MSI, SMART and now ObjDTM puzzle into place - one piece at a time.