Results 1 to 7 of 7

Thread: Form Error

  1. #1
    Join Date
    Feb 2013
    Posts
    55
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default Form Error

    Getting this error:

    Code:
    Program exception! 
    Stacktrace:
    
    Exception class: EPSException
    Message: Could not call proc
      $00669BF5
      $0066931F
      $0054EE2F
      $0054F356
      $0054F8B1
      $0054ED3A
      $0040C37A
      $004EBC0D
      $00568BE7
      $0050E94E
      $005804CF
      $74F66238
      $74F668EA
      $74F6CD1A
      $74F6CD81
      $72FC4E95
      $72FC4EF7
    Simba Version: 992
    My code is:

    Code:
    procedure SetAxe;
    begin
      case LogCombo.ITEMINDEX of
        0:
          Begin
            WieldAxe := True;
          End;
        1:
          Begin
            WieldAxe := False;
          End;
       End;
    End;
    procedure SetTrees;
    begin
      case LogCombo.ITEMINDEX of
        0:
          Begin
            TreeColor := 4750964;
            Uptext_1 := 'Chop';
            Uptext_2 := 'cho';
            Uptext_3 := 'hop';
          End;
        1:
          Begin
            TreeColor := 2124898;
            Uptext_1 := 'Chop';
            Uptext_2 := 'cho';
            Uptext_3 := 'hop';
          End;
        2:
          Begin
            TreeColor := 3764327;
            Uptext_1 := 'Chop';
            Uptext_2 := 'hop';
            Uptext_3 := 'cho';
          End;
       End;
    End;
    procedure SaveFormInfo(Sender: TObject);
    begin
      DsgnForm.ModalResult := mrOk;
      StartTime := GetSystemTime;
      P07_PlayerName := Username.TEXT
      P07_PlayerPass := Password.TEXT                                                          // Saving the text, before we close the form
      DsgnForm.CLOSE;
      SetAxe;
      SetTrees;
    end;
    
    
      procedure InitForm;
    begin
     DsgnForm:=TForm.Create(nil);
      with DsgnForm do
        begin
          Caption:='PowerChop 1.0';
          Left:=346;
          Top:=419;
          Width:=200;
          Height:=140;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      end;
     TLabel0:=TLabel.Create(DsgnForm);
      with TLabel0 do
        begin
          Parent:=DsgnForm;
          Caption:='PowerChop 1.0';
          Left:=50;
          Top:=10;
          Width:=41;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=13;
      end;
     TLabel1:=TLabel.Create(DsgnForm);
      with TLabel1 do
        begin
          Parent:=DsgnForm;
          Caption:='Tree';
          Left:=40;
          Top:=40;
          Width:=41;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      end;
     TLabel2:=TLabel.Create(DsgnForm);
      with TLabel2 do
        begin
          Parent:=DsgnForm;
          Caption:='Wield Axe';
          Left:=40;
          Top:=80;
          Width:=48;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      end;
     TButton10:=TButton.Create(DsgnForm);
      with TButton10 do
        begin
          Parent:=DsgnForm;
          Caption:='Start';
          Left:=50;
          Top:=110;
          Width:=75;
          Height:=25;
          OnClick:=@SaveFormInfo;
      end;
     LogCombo:=TComboBox.Create(DsgnForm);
      with LogCombo do
        begin
          Parent:=DsgnForm;
          Left:=100;
          Top:=40;
          Width:=50;
          Height:=21;
          Items.Add('Tree');
          Items.Add('Oak');
          Items.Add('Willow');
          Text := Items[0];
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      end;
     AxeCombo:=TComboBox.Create(DsgnForm);
      with AxeCombo do
        begin
          Parent:=DsgnForm;
          Left:=100;
          Top:=80;
          Width:=50;
          Height:=21;
          Items.Add('Yes');
          Items.Add('No');
          Text := Items[0];
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      end;
    end;
    
    
    procedure SafeInitForm;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('InitForm', v);
    end;
    
    
    procedure ShowFormModal;
    begin
      DsgnForm.ShowModal;
    end;
    
    
    procedure SafeShowFormModal;
    var
      v: TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('ShowFormModal', v);
    end;
    
    
    begin
      SafeInitForm;
      SafeShowFormModal;
      P07_DeclarePlayer;
      SetupP07Include;
      ActivateClient;
      SetTrees;
      SetAxe;
      Wait(100);

  2. #2
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Simba install error, try a re-install elsewhere?
    Last edited by DannyRS; 02-26-2013 at 08:00 PM.


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  3. #3
    Join Date
    Feb 2013
    Posts
    55
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    simba install error
    But other script which uses this too works?

  4. #4
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by Grand01 View Post
    But other script which uses this too works?
    SafeInitForm;
    SafeShowFormModal;

    comment those out and try


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  5. #5
    Join Date
    Feb 2013
    Posts
    55
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    SafeInitForm;
    SafeShowFormModal;

    comment those out and try
    It doesn't work if remove those.


    EDIT: Thanks for trying help btw.

  6. #6
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by Grand01 View Post
    It doesn't work if remove those.


    EDIT: Thanks for trying help btw.
    Yea but the form stuff is broken in that script


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  7. #7
    Join Date
    Feb 2013
    Posts
    55
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    Yea but the form stuff is broken in that script
    I got it fixed! :P

Thread Information

Users Browsing this Thread

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

Posting Permissions

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