SRL Archive - First Scripts

My first (half) script Question


Mohamedi910

2012-03-05 00:17:34

So I was creating my first scripts of a guide.. this is what I ended with…
program new;
{$i srl/srl.simba}

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

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



begin
SetupSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
end.

Some people may think I just copied this of the guide (but I was able to end up with the same thing :) ) but my question is howcome when I click play the client does not open? Can someone tell me how to insert the box with the text in it also thanks :)

lilcmp1

2012-03-05 00:22:36

Add;
 {$DEFINE SMART} 
At the top to launch smart. Under or above {$i srl/srl.simba}

Would do you mean by 'insert the box with the text' btw?

putonajonny

2012-03-05 16:39:20

What he said or you can just put:

{.include srl/srl.simba}   //what you have already
{.include srl/srl/misc/Smart.simba} //the new bit

Littellj

2012-03-06 10:19:59

Theirs a simba looking thing on the top right, click that and put text in between. wallah

Striken

2012-03-06 17:08:39

You need to declare smart.

Mr Stoj

2012-03-06 17:41:23

my basic template

program (script name)
{$DEFINE SMART}
{$DEFINE SRL5}
{$i srl/srl.simba}

const
SRLStats_Username = '';// SRL Stats ID
SRLStats_Password = '';// SRL Stats Pass
(more constants)


var
(variables here)

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

with Players[0] do
begin
Name :=''; // Username
Pass :=''; // Password
Nick :=''; //
Pin :=''; // PINS
Member := true;
Active := true;
end;
end;

[D]ude

2012-03-21 14:22:16

You could use the

Writeln(''); <—-oops I wrote an I in there at first instead of l

to put text into your debug box. so once you declare smart, you can have your main program be:


begin
SetupSRL; //<—–make sure to use proper format idt it shows the proper spaces that I put in their, but you get
DeclarePlayers; //the idea
LoginPlayer;
Writeln('Yay we logged into the game');
end.


Writeln has an L and not an I in it. I always got confused with this. You can copy and paiste this into a new simba file and hit play and it will say "Hey homies" indefinitely in the debug box.




program SayHi;


Procedure Talk;
Begin
Writeln('Hey homies');
End;

Begin
Repeat Talk;
Until (False);
End.


Hope I was of help! Gl with your script :D