Results 1 to 10 of 10

Thread: Out Of Range...

  1. #1
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default Out Of Range...

    Hi, its me (again rofl), I get an error in my ShowFormModal procedure...

    Error :
    SCAR Code:
    Successfully compiled (3520 ms)
    SRL Compiled in 16078 msec
    [Runtime Error] : Out Of Range in line 308 in script C:\Program Files\SCAR 3.15b\Scripts\Tut Runner.scar

    Lines Around that line :

    SCAR Code:
    procedure ShowFormModal;
    begin
      frmDesign.ShowModal;
    end;

    Help me plx !!!

  2. #2
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    That is not really your problem. Just Go to your initform procedure and change


    SCAR Code:
    frmDesign.Visible := true;

    to

    SCAR Code:
    frmDesign.Visible := false;

    Now your form should start
    I do visit every 2-6 months

  3. #3
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    dude that's already done....
    I get out of range after i started form

  4. #4
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Use Ron's DFM Form Parser

  5. #5
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Post your form init procedure.

  6. #6
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    What does that do.... ? xD ok I'll try it :S.
    I'll edit this post when i'm done. . .

    Zephyr here's my init procedure :

    SCAR Code:
    procedure InitForm;
    begin
      frmDesign := CreateForm;
      frmDesign.Left := 282;
      frmDesign.Top := 6;
      frmDesign.Width := 933;
      frmDesign.Height := 656;
      frmDesign.Caption := 'Account Info';
      frmDesign.Color := clBtnFace;
      frmDesign.Font.Color := clWindowText;
      frmDesign.Font.Height := -11;
      frmDesign.Font.Name := 'MS Sans Serif';
      frmDesign.Font.Style := [];
      frmDesign.OnPaint := @DrawImages;
      frmDesign.Visible := False;
      frmDesign.PixelsPerInch := 96;
      Image1 := TImage.Create(frmDesign);
      Image1.Parent := frmDesign;
      Image1.Left := 0;
      Image1.Top := 0;
      Image1.Width := 929;
      Image1.Height := 625;
      Image1.Visible := False;
      Edit1 := TEdit.Create(frmDesign);
      Edit1.Parent := frmDesign;
      Edit1.Left := 704;
      Edit1.Top := 480;
      Edit1.Width := 209;
      Edit1.Height := 21;
      Edit1.TabOrder := 8;
      Edit1.Text := 'Username';
      Edit2 := TEdit.Create(frmDesign);
      Edit2.Parent := frmDesign;
      Edit2.Left := 704;
      Edit2.Top := 504;
      Edit2.Width := 209;
      Edit2.Height := 21;
      Edit2.TabOrder := 9;
      Edit2.Text := 'Password';
      Button1 := TButton.Create(frmDesign);
      Button1.OnClick := @ButtonClick;
      Button1.Parent := frmDesign;
      Button1.Left := 704;
      Button1.Top := 568;
      Button1.Width := 217;
      Button1.Height := 41;
      Button1.Caption := 'Start Script';
      Button1.Default := True;
      Button1.TabOrder := 10;
      Edit3 := TEdit.Create(frmDesign);
      Edit3.Parent := frmDesign;
      Edit3.Left := 704;
      Edit3.Top := 528;
      Edit3.Width := 209;
      Edit3.Height := 21;
      Edit3.TabOrder := 11;
      Edit3.Text := 'NickName (3-4 letters of your name)';
    end;

    [EDIT1] : Ron's parser doesn't include the function for Images in the Form...

  7. #7
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Hmm I can't see anything wrong with that particular procedure. Maybe its something to do with the functions that you call in the form (ButtonClick or DrawImages). Its annoying cos no matter where the error is in the form, SCAR points you to the ShowModal line.

  8. #8
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Yeah... I'll give you the ButtonClick and DrawImages parts.

    SCAR Code:
    procedure DrawImages(sender: TObject);
    var
      BG : Integer;
      Canvas : TCanvas;

    begin
      BG := BitmapFromString(707,499, 'bitmap string....');
      Canvas := GetBitmapCanvas(BG);
      CopyCanvas(Canvas, frmDesign.Canvas,0,0,705,500,0,0,930,625 );
      FreeBitmap(BG);
    end;

    SCAR Code:
    procedure ButtonClick(sender: TObject);
    begin
      SetupPlayerAndScript;
      RSGuide;
      frmDesign.ModalResult:= mrOk;
    end;

    This is reeaaaaaallly annoying, no error in script but i get out of range
    HELP ME PL0000X !!!

  9. #9
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Dervish, did you get the email that I sent you with the new form in it? Because that one works for me that I finished off...
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  10. #10
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Wow great =) ... I'l get it =)

    FUCKING AWESOME !!!
    So, i'll just add the script itself to the current form now ?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. 71-99 range?
    By isjusme in forum RuneScape News and General
    Replies: 16
    Last Post: 06-02-2008, 03:45 PM
  2. 70 range
    By isjusme in forum RuneScape News and General
    Replies: 6
    Last Post: 04-27-2008, 05:37 PM
  3. out of range
    By nik999389 in forum OSR Help
    Replies: 4
    Last Post: 10-29-2007, 09:43 AM
  4. Out of range
    By rotflmfwao in forum OSR Help
    Replies: 3
    Last Post: 08-22-2007, 02:29 AM
  5. Eh... Out of Range...
    By Pancakes in forum OSR Help
    Replies: 4
    Last Post: 07-03-2007, 11:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •