I have been "scripting" for about 2 months. I have mainly just been altering other peoples scripts to fit my needs. This is my first Solo attempt to make a script. It is really simple but this is what I got.
What it is is an extremely complicated version of the "Hello World" Script. I included A lot of the basics like constants, vars, If/then, and the SRL Declare Players (for practice). Well, Here it is. My first Solo Script:
SCAR Code:
program Hello;
{.include srl/srl.scar}
var
TimesWritten: Integer;
const
TimesToWrite = 5; //how many time to write
WhatToWrite = 'Hello Everyone'; //What you want to say
TimeBetween = 0; //Milliseconds
ClearDeBugs = False; //Clear the Debug First?
MySRLID = ''; // SRL Stats ID
MySRLPassword = ''; //SRL Stats Password
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
SRLID := MySRLID;
SRLPassword := MySRLPassword;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
begin
if (ClearDebugs) then
begin
ClearDebug;
end else
Writeln('Not Clearing Debug');
end;
Writeln('Player(s): ' + IntToStr(HowManyPlayers) + ';');
end;
procedure WriteIt;
begin
repeat
WriteLn(WhatToWrite);
TimesWritten := TimesWritten + 1;
Wait(TimeBetween);
until TimesWritten = TimesToWrite;
end;
begin
DeclarePlayers;
WriteIt;
end.
Any Compliments/Suggestions are welcome.