AlwaysConfused
11-21-2018, 07:48 AM
Hi, first off if i'm in the wrong area, my bad. I'm new to these forums and the art of writing this language. I've been following the set-up guides available throughout these forums which are very detailed. I'm having issues getting the code i have to log me in to S.M.A.R.T. I've tried manipulating everything that i can think of. Any help would be greatly appreciated, thanks in advance.... the code i have follows;
program scriptSkeleton;
{$define SMART}
{$I SRL/OSR.simba}
{$I RSWalker/Walker.simba}
//Declare our Constants
const
LOGIN_NAME = '**********'; //Username/Email
LOGIN_PASS = '**********'; //Password
RS_WORLD = -1; //Desired World (-1 = Random)
IS_MEMBER = True; //True if your player is a Member
//Declare our variables
var
Walk: TRSWalker; //Used for RSWalker (to walk paths)
{************************************************* ******************************
Name: declarePlayers();
Function: Sets the proper variables using the constants above to allow
a successful login.
************************************************** *****************************}
procedure declarePlayers();
begin
with Players.New()^ do
begin
LoginName := LOGIN_NAME;
Password := LOGIN_PASS;
IsActive := True;
IsMember := IS_MEMBER;
World := RS_WORLD;
end;
Players.SetCurrent(0);
end;
{************************************************* ******************************
Name: setUp();
Function: Sets up the script by initializing everything and logging player in.
************************************************** *****************************}
function setUp(): boolean;
begin
SRL.Setup([]); //Setup SRL to allow us to access it's functions.
Walk.Init('world.png', -1); //Setup RSWalker by initializing the map we want to use
declarePlayers(); //Declare the player we are using
if (not SRL.isLoggedIn) then //If not logged in then..
begin
Players.LoginCurrent(); //Log player in
MainScreen.setAngle(True); //Sets the camera angle to the highest point
end;
Result := True;
end;
begin //Main
if setUp then
writeln('We are set up and ready to go!');
end.
program scriptSkeleton;
{$define SMART}
{$I SRL/OSR.simba}
{$I RSWalker/Walker.simba}
//Declare our Constants
const
LOGIN_NAME = '**********'; //Username/Email
LOGIN_PASS = '**********'; //Password
RS_WORLD = -1; //Desired World (-1 = Random)
IS_MEMBER = True; //True if your player is a Member
//Declare our variables
var
Walk: TRSWalker; //Used for RSWalker (to walk paths)
{************************************************* ******************************
Name: declarePlayers();
Function: Sets the proper variables using the constants above to allow
a successful login.
************************************************** *****************************}
procedure declarePlayers();
begin
with Players.New()^ do
begin
LoginName := LOGIN_NAME;
Password := LOGIN_PASS;
IsActive := True;
IsMember := IS_MEMBER;
World := RS_WORLD;
end;
Players.SetCurrent(0);
end;
{************************************************* ******************************
Name: setUp();
Function: Sets up the script by initializing everything and logging player in.
************************************************** *****************************}
function setUp(): boolean;
begin
SRL.Setup([]); //Setup SRL to allow us to access it's functions.
Walk.Init('world.png', -1); //Setup RSWalker by initializing the map we want to use
declarePlayers(); //Declare the player we are using
if (not SRL.isLoggedIn) then //If not logged in then..
begin
Players.LoginCurrent(); //Log player in
MainScreen.setAngle(True); //Sets the camera angle to the highest point
end;
Result := True;
end;
begin //Main
if setUp then
writeln('We are set up and ready to go!');
end.