Results 1 to 15 of 15

Thread: Player Form Freeze (HELP)

  1. #1
    Join Date
    Mar 2007
    Posts
    138
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Player Form Freeze (HELP)

    When I am making my form I go into Tools>Form Editor...

    I create my form and then save. I load it get the variables and then i put it in the right spot for it to work. When i hit play it opens up but then it freezes and my whole scar shuts down due to a problem?

    If you want me to send you my Form I can. It's just a little stupid test thing to see if it works and so far it doesnt. Please help me make it not freeze..Thanks.

    __________________________________________________ _______________

    Scripts made > 5
    Scripts Work > 4
    Scripts Sold > 0


  2. #2
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    post the script please?

  3. #3
    Join Date
    Mar 2007
    Location
    Under a rock
    Posts
    813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, please post it. Or maybe try to change this:
    frmDesign.Visible := True;
    to this
    frmDesign.Visible := False;

  4. #4
    ronny.m.p Guest

    Default

    One of the possible 3 problems:

    1 : Do above

    2 : Your comp sucks

    3 : Your form is trying to load too many variables or other items at once

  5. #5
    Join Date
    Mar 2007
    Posts
    138
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol i know how to change and do all the stuff i'm just seeing stuff to make it not freeze, hes the form part, really nooby to see why freezes

    Code:
    frmDesign := CreateForm;
    frmDesign.Left := 250;
    frmDesign.Top := 114;
    frmDesign.Width := 696;
    frmDesign.Height := 480;
    frmDesign.Caption := 'frmDesign';
    frmDesign.Color := clBtnFace;
    frmDesign.Font.Color := clWindowText;
    frmDesign.Font.Height := -11;
    frmDesign.Font.Name := 'MS Sans Serif';
    frmDesign.Font.Style := [];
    frmDesign.Visible := True;
    frmDesign.PixelsPerInch := 96;
    Label1 := TLabel.Create(frmDesign);
    Label1.Parent := frmDesign;
    Label1.Left := 100;
    Label1.Top := 21;
    Label1.Width := 32;
    Label1.Height := 13;
    Label1.Caption := 'Label1';
    Button1 := TButton.Create(frmDesign);
    Button1.Parent := frmDesign;
    Button1.Left := 362;
    Button1.Top := 294;
    Button1.Width := 75;
    Button1.Height := 25;
    Button1.Caption := 'Button1';
    Button1.TabOrder := 8;
    GroupBox1 := TGroupBox.Create(frmDesign);
    GroupBox1.Parent := frmDesign;
    GroupBox1.Left := 133;
    GroupBox1.Top := 90;
    GroupBox1.Width := 195;
    GroupBox1.Height := 121;
    GroupBox1.Caption := 'GroupBox1';
    GroupBox1.TabOrder := 9;
    freezes := TMemo.Create(frmDesign);
    freezes.Parent := frmDesign;
    freezes.Left := 436;
    freezes.Top := 102;
    freezes.Width := 187;
    freezes.Height := 103;
    freezes.Lines.Add('freezes');
    freezes.Lines.Add('I know how to change');
    freezes.Lines.Add('all the stuf');
    freezes.Lines.Add('but im just seeing');
    freezes.Lines.Add('how to make it not freeze');
    freezes.TabOrder := 10;
    __________________________________________________ _______________

    Scripts made > 5
    Scripts Work > 4
    Scripts Sold > 0

  6. #6
    Join Date
    Mar 2007
    Location
    Under a rock
    Posts
    813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Put this in your script somewhere:
    SCAR Code:
    Procedure SafeInitForm;
    var
    v: TVariantArray;
    begin
    setarraylength(V, 0);
    ThreadSafeCall('InitForm', v);
    end;

    Procedure ShowFormModal;
    begin
    frmDesign.ShowModal;
    end;

    procedure SafeShowFormModal;
    var
    v: TVariantArray;
    begin
    setarraylength(V, 0);
    ThreadSafeCall('ShowFormModal', v);
    end;

    and this is the main loop:

    begin
    SafeInitForm;
    SafeShowFormModal;
    end.

  7. #7
    Join Date
    Mar 2007
    Posts
    138
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I write what is underneath and it doesn't work..

    Code:
    program TestForm;
    
    var
      All the var stuff(I got it)
    
    Procedure SafeInitForm;
    var
    v: TVariantArray;
    begin
    setarraylength(V, 0);
    ThreadSafeCall('InitForm', v);
    end;
     
    Procedure ShowFormModal;
    begin
    frmDesign.ShowModal;
    end;
     
    procedure SafeShowFormModal;
    var
    v: TVariantArray;
    begin
    setarraylength(V, 0);
    ThreadSafeCall('ShowFormModal', v);
    end;
    
    begin
    frmDesign := CreateForm;
    frmDesign.Left := 250;
    frmDesign.Top := 114;
    frmDesign.Width := 696;
    frmDesign.Height := 480;
    frmDesign.Caption := 'frmDesign';
    frmDesign.Color := clBtnFace;
    frmDesign.Font.Color := clWindowText;
    frmDesign.Font.Height := -11;
    frmDesign.Font.Name := 'MS Sans Serif';
    frmDesign.Font.Style := [];
    frmDesign.Visible := True;
    frmDesign.PixelsPerInch := 96;
    Label1 := TLabel.Create(frmDesign);
    Label1.Parent := frmDesign;
    Label1.Left := 100;
    Label1.Top := 21;
    Label1.Width := 32;
    Label1.Height := 13;
    Label1.Caption := 'Label1';
    Button1 := TButton.Create(frmDesign);
    Button1.Parent := frmDesign;
    Button1.Left := 362;
    Button1.Top := 294;
    Button1.Width := 75;
    Button1.Height := 25;
    Button1.Caption := 'Button1';
    Button1.TabOrder := 8;
    GroupBox1 := TGroupBox.Create(frmDesign);
    GroupBox1.Parent := frmDesign;
    GroupBox1.Left := 133;
    GroupBox1.Top := 90;
    GroupBox1.Width := 195;
    GroupBox1.Height := 121;
    GroupBox1.Caption := 'GroupBox1';
    GroupBox1.TabOrder := 9;
    freezes := TMemo.Create(frmDesign);
    freezes.Parent := frmDesign;
    freezes.Left := 436;
    freezes.Top := 102;
    freezes.Width := 187;
    freezes.Height := 103;
    freezes.Lines.Add('freezes');
    freezes.Lines.Add('I know how to change');
    freezes.Lines.Add('all the stuf');
    freezes.Lines.Add('but im just seeing');
    freezes.Lines.Add('how to make it not freeze');
    freezes.TabOrder := 10;
    end;
    
    begin
    SafeInitForm;
    SafeShowFormModal;
    end.
    Just doesn't work then I changed one thing and it didn't run the stuff just the old thing I get where it freezes.. Please help thanks

    __________________________________________________ _______________

    Scripts made > 5
    Scripts Work > 4
    Scripts Sold > 0

  8. #8
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    give us the vars to so we can try it on ourselves.

  9. #9
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You need to make everything like, FrmDesgin, Edit1 all those lines you generate into a procedure called InitForm;


    EDIT: This was extremly easy, Only three main problems

    FrmDesign.Visible needs to be false
    Your Scripting standards need improvement
    You need to define all that FrmDesign stuff as Procedure Initform;

    Here is you're fixed form.

    SCAR Code:
    program TestForm;

    var
      FrmDesign: TForm;
      Label1: TLabel;
      Button1: TButton;
      GroupBox1: TGroupBox;
      Freezes: TMemo;

    procedure SafeInitForm;
    var
      v: TVariantArray;
    begin
      Setarraylength(V, 0);
      ThreadSafeCall('InitForm', v);
    end;

    procedure ShowFormModal;
    begin
      FrmDesign.ShowModal;
    end;

    procedure SafeShowFormModal;
    var
      v: TVariantArray;
    begin
      Setarraylength(V, 0);
      ThreadSafeCall('ShowFormModal', v);
    end;

    procedure InitForm;
    begin
      FrmDesign := CreateForm;
      FrmDesign.Left := 250;
      FrmDesign.Top := 114;
      FrmDesign.Width := 696;
      FrmDesign.Height := 480;
      FrmDesign.Caption := 'frmDesign';
      FrmDesign.Color := clBtnFace;
      FrmDesign.Font.Color := clWindowText;
      FrmDesign.Font.Height := -11;
      FrmDesign.Font.Name := 'MS Sans Serif';
      FrmDesign.Font.Style := [];
      FrmDesign.Visible := False;
      FrmDesign.PixelsPerInch := 96;
      Label1 := TLabel.Create(frmDesign);
      Label1.Parent := frmDesign;
      Label1.Left := 100;
      Label1.Top := 21;
      Label1.Width := 32;
      Label1.Height := 13;
      Label1.Caption := 'Label1';
      Button1 := TButton.Create(frmDesign);
      Button1.Parent := frmDesign;
      Button1.Left := 362;
      Button1.Top := 294;
      Button1.Width := 75;
      Button1.Height := 25;
      Button1.Caption := 'Button1';
      Button1.TabOrder := 8;
      GroupBox1 := TGroupBox.Create(frmDesign);
      GroupBox1.Parent := frmDesign;
      GroupBox1.Left := 133;
      GroupBox1.Top := 90;
      GroupBox1.Width := 195;
      GroupBox1.Height := 121;
      GroupBox1.Caption := 'GroupBox1';
      GroupBox1.TabOrder := 9;
      Freezes := TMemo.Create(frmDesign);
      Freezes.Parent := frmDesign;
      Freezes.Left := 436;
      Freezes.Top := 102;
      Freezes.Width := 187;
      Freezes.Height := 103;
      Freezes.Lines.Add('freezes');
      Freezes.Lines.Add('I know how to change');
      Freezes.Lines.Add('all the stuf');
      Freezes.Lines.Add('but im just seeing');
      Freezes.Lines.Add('how to make it not freeze');
      Freezes.TabOrder := 10;
    end;

    begin //MainLoop
      SafeInitForm;
      SafeShowFormModal;
    end.

  10. #10
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    and set frmDesign.Visible:=False
    Interested in C# and Electrical Engineering? This might interest you.

  11. #11
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Smartzkid View Post
    and set frmDesign.Visible:=False
    FrmDesign.Visible needs to be false
    I think I said that.

  12. #12
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Yeah, but he didn't change it, so I figured that I may as well say it again

    EDIT:

    Actually, I think rune hacker beat both of us to it
    Interested in C# and Electrical Engineering? This might interest you.

  13. #13
    Join Date
    Mar 2007
    Posts
    138
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks i'll try that then tell you how it went and ill send you my vars if it doesn't work. Ya I am kinda new at scripting.. I made a few lil easy power's for starters but now I want to be big..

    __________________________________________________ _______________

    Scripts made > 5
    Scripts Work > 4
    Scripts Sold > 0

  14. #14
    Join Date
    Mar 2007
    Location
    Under a rock
    Posts
    813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Smartzkid View Post
    Yeah, but he didn't change it, so I figured that I may as well say it again

    EDIT:

    Actually, I think rune hacker beat both of us to it
    Muahahaha. And what Icefire908 posted works. I was too busy to put it all together, but he did.

  15. #15
    Join Date
    Mar 2007
    Posts
    138
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Umm i it works but now how do i make it when I hit the button it closes the screen and how can i edit it in the form maker thing now?

    __________________________________________________ _______________

    Scripts made > 5
    Scripts Work > 4
    Scripts Sold > 0

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. srl player form
    By poolikemax in forum OSR Help
    Replies: 2
    Last Post: 01-05-2009, 09:54 PM
  2. Player Form HELP!!!!
    By osmm in forum OSR Help
    Replies: 5
    Last Post: 11-17-2007, 05:09 AM
  3. Help with Player Form
    By antknee3 in forum OSR Help
    Replies: 2
    Last Post: 04-03-2007, 05:18 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
  •