Santa_Clause
2007-09-30 03:03:44
[Runtime Error] : Out of Global Vars range in line 239 in script C:\Documents and Settings\Eminem\Desktop\Nothing.scar
program New;
var
SantyForm : TForm;
TitleLabelWelcome : TLabel;
BeginButtonWelcome, CancelButtonWelcome : TButton;
LoadsNumberEdit, SRLIDEdit, SRLPassEdit : TEdit;
RespondCombo, CheckVersionCombo, TakeScreeniesCombo : TComboBox;
OpenPlayerForm : Boolean;
HowManyLoads : Integer;
UseResponder : Boolean;
function GetNumbersBool(s : string; leng : integer) : Boolean;
var
tmpint : integer;
begin
tmpint := Length(GetNumbers(s));
result := leng <= tmpint;
end;
procedure BeginScript(Senders : TObject);
begin
if not(GetNumbersBool(LoadsNumberEdit.Text, 0)) then
begin
ShowMessage('Invalid Number Of Loads...');
Exit;
end;
HowManyLoads := StrToInt(LoadsNumberEdit.Text);
WriteLn(IntToStr(HowManyLoads));
if (RespondCombo.Text = '') then
begin
ShowMessage('Please Fill In Respond Box!');
Exit;
end;
UseResponder := (StrToBool(RespondCombo.Text));
OpenPlayerForm := True;
SantyForm.ModalResult := mrOk;
end;
procedure EndScript(Senders : TObject);
begin
SantyForm.ModalResult := mrCancel;
OpenPlayerForm := False;
end;
procedure GuildminerWelcome;
begin
SantyForm := CreateForm;
with SantyForm do
begin
Position := poScreenCenter;
BorderStyle := bsSingle;
BorderIcons := [biMinimize,biSystemMenu];
FormStyle := fsStayOnTop;
ClientWidth := 510;
ClientHeight := 340;
Caption := 'frmDesign';
Color := clBtnFace;
Font.Color := clWindowText;
Font.Height := -11;
Font.Name := 'MS Sans Serif';
Font.Style := [];
PixelsPerInch := 96;
end;
TitleLabelWelcome := TLabel.Create(SantyForm);
with TitleLabelWelcome do
begin
Parent := SantyForm;
Left := 152;
Top := 24;
Width := 218;
Height := 33;
Caption := 'JuKKa'#39's Guild-Miner!';
Font.Color := clYellow;
Font.Height := -27;
Font.Name := 'Monotype Corsiva';
Font.Style := [];
ParentFont := False;
end;
BeginButtonWelcome := TButton.Create(SantyForm);
with BeginButtonWelcome do
begin
Parent := SantyForm;
Left := 263;
Top := 240;
Width := 75;
Height := 25;
Caption := 'Begin';
TabOrder := 8;
OnClick := @BeginScript;
end;
CancelButtonWelcome := TButton.Create(SantyForm);
with CancelButtonWelcome do
begin
Parent := SantyForm;
Left := 167;
Top := 240;
Width := 75;
Height := 25;
Caption := 'Cancel';
TabOrder := 9;
OnClick := @EndScript;
end;
LoadsNumberEdit := TEdit.Create(SantyForm);
with LoadsNumberEdit do
begin
Parent := SantyForm;
Left := 279;
Top := 128;
Width := 145;
Height := 21;
Font.Color := clRed;
Font.Height := -11;
Font.Name := 'MS Sans Serif';
Font.Style := [];
ParentFont := False;
TabOrder := 10;
Text := 'Number Of Loads?';
end;
RespondCombo := TComboBox.Create(SantyForm);
with RespondCombo do
begin
Parent := SantyForm;
Left := 95;
Top := 160;
Width := 145;
Height := 21;
Font.Color := clRed;
Font.Height := -11;
Font.Name := 'MS Sans Serif';
Font.Style := [];
ItemHeight := 13;
ParentFont := False;
TabOrder := 11;
Text := 'Respond?';
with RespondCombo.Items do
begin
Add('True');
Add('False');
end;
end;
CheckVersionCombo := TComboBox.Create(SantyForm);
with CheckVersionCombo do
begin
Parent := SantyForm;
Left := 271;
Top := 160;
Width := 145;
Height := 21;
Font.Color := clRed;
Font.Height := -11;
Font.Name := 'MS Sans Serif';
Font.Style := [];
ItemHeight := 13;
ParentFont := False;
TabOrder := 12;
Text := 'Check Version?';
with CheckVersionCombo.Items do
begin
Add('True');
Add('False');
end;
end;
TakeScreeniesCombo := TComboBox.Create(SantyForm);
with TakeScreeniesCombo do
begin
Parent := SantyForm;
Left := 87;
Top := 128;
Width := 145;
Height := 21;
Font.Color := clRed;
Font.Height := -11;
Font.Name := 'MS Sans Serif';
Font.Style := [];
ItemHeight := 13;
ParentFont := False;
TabOrder := 13;
Text := 'Take Screenshots?';
with TakeScreeniesCombo.Items do
begin
Add('True');
Add('False');
end;
end;
SRLIDEdit := TEdit.Create(SantyForm);
with SRLIDEdit do
begin
Parent := SantyForm;
Left := 263;
Top := 192;
Width := 121;
Height := 21;
Font.Color := clRed;
Font.Height := -11;
Font.Name := 'MS Sans Serif';
Font.Style := [];
ParentFont := False;
TabOrder := 14;
Text := 'SRL ID?';
end;
SRLPassEdit := TEdit.Create(SantyForm);
with SRLPassEdit do
begin
Parent := SantyForm;
Left := 127;
Top := 192;
Width := 121;
Height := 21;
Font.Color := clRed;
Font.Height := -11;
Font.Name := 'MS Sans Serif';
Font.Style := [];
ParentFont := False;
TabOrder := 16;
Text := 'SRL Password?';
end;
end;
procedure SafeGuildminerWelcome;
var
V : TVariantArray;
begin
SetArrayLength(V, 0);
ThreadSafeCall('GuildminerWelcome', V);
end;
procedure ShowGuildminerWelcomeModal;
begin
SantyForm.ShowModal;
end;
procedure SafeShowGuildminerWelcomeModal;
var
R : TVariantArray;
begin
SetArrayLength(R, 0);
ThreadSafeCall('ShowGuildminerWelcomeModal', R);
end;
procedure MainGuildminerWelcome;
begin
try
SafeGuildminerWelcome;
SafeShowGuildminerWelcomeModal;
except
WriteLn('An error seems to have occurred in: GuildminerWelcome');
end;
end;
begin
ClearDebug;
MainGuildminerWelcome;
if OpenPlayerForm then
WriteLn('Started');
end.If you open the form, press begin without filling in anything, then fill in all the boxes and press begin, you'll get that error.