Results 1 to 17 of 17

Thread: Unknown identifier

  1. #1
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default Unknown identifier

    I keep getting

    Code:
    [Error] C:\Users\\Desktop\STUFF\fletcher3.simba(1261:3): Unknown identifier 'SetupFletcherInclude' at line 1260
    Compiling failed.
    When I try to Include my TForm in the script.. I have this at the top

    Simba Code:
    {$I FletcherTForm.Simba}

    And I have this procedure to set it up:

    Simba Code:
    Procedure SetupFletcherInclude;
    Begin
      SafeInitForm;
      SafeShowFormModal;
    End;

    I don't get what I'm doing wrong

  2. #2
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Did you call SetupFletcherInclude() in another procedure before that piece of code?
    Or if that procedure is in ur include, did you include it properly? Is that file directly in ur SRL folder?

  3. #3
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by riwu View Post
    Did you call SetupFletcherInclude() in another procedure before that piece of code?
    Or if that procedure is in ur include, did you include it properly? Is that file directly in ur SRL folder?
    The procedure is all the way at the bottom of the include script

    Include looks like this:

    Simba Code:
    Var
    DsgnForm:TForm;
      TLabel0,TLabel1,TLabel2,TLabel3,TLabel4,TLabel5,WithDLabel:TLabel;
      ObjectLabel,AreaLabel,FletchLabel,FailsafeLabel,OtherLabel,CustomLabel,Slot1Label,Slot2Label:TLabel;
      SpeedLabel,Objectaccurate,MakeLabel,{WithX,WithY,}StringLabel,StringXLabel,StringYLabel:TLabel;
      WithXLabel,WithX2Label,WithY2Label,WithYLabel:TLabel;
      Username,Password,WithDX1,WithDY1,WithDX2,WithDY2,StringX,StringY: TEdit;
      LogCombo,CompassCombo,ObjectCombo,FailsafeCombo,SpeedCombo,MakeCombo:TComboBox;
      MethodCombo,objectaccurateCombo,WithdrawCombo,StringCombo:TComboBox;
      StartButton,UpdateButton: TButton;
    procedure SetWithdraw;
    Begin
      Case  WithdrawCombo.ITEMINDEX of
        0:
        Begin
          Writeln('Built In DTMs');
          StringWithDraw := 'builtin';
        End;
        1:
        Begin
          Writeln('First and second Slot');
          StringWithDraw := 'firstsecond';

        End;
        2:
        Begin
          Writeln('Custom');
          StringWithDraw := 'custom';
        End;
      End;
    End;
    procedure SetSpeed;
    Begin
      Case CompassCombo.ITEMINDEX of
        0:
        Begin
          Writeln('Fletching Speed:Slow');
          MouseSpeed := RanDomRange(12,14);
        End;
        1:
        Begin
          Writeln('Fletching Speed:Medium');
          MouseSpeed := RanDomRange(15,16);
        End;
        2:
        Begin
          Writeln('Fletching Speed:Fast');
          MouseSpeed := RanDomRange(17,20);
        End;
      End;
    End;
    procedure SetFailSafeArea;
    Begin
      Case FailSafeCombo.ITEMINDEX of
        0: LocFail := True;
        1: LocFail := False;
      End;
    End;
    procedure Setstring;
    Begin
      Case LowerCase(Make) of
        'shorts': // NEED MAPLES
          Begin
            Case LowerCase(NameUse) of
              'logs': DTM_Made := DTMFromString('mQwAAAHicY2ZgYBADYmkg5gNiESDmB2IJIO6vFWCY3AjB/FBxEGZEwkAAAJNPBBI=');
              'oaks': DTM_Made := DTMFromString('mQwAAAHicY2ZgYDjAxMBwDIh3APFzIP8hEL8C4q4CQYYpFYIMM6oFGfiBfBhmRMJAAAB65gh2');
              'willows': DTM_Made := DTMFromString('mQwAAAHicY2ZgYJAAYnkgFgBicSAWBGJpIG6p1WdIjlVm6GjUZ+AH8mGYEQkDAQCStgQJ');
              'maples': DTM_Made := DTMFromString('mQwAAAHicY2ZgYChgYmDIAOJiIH4G5D8F4odAHGbCCcf8QD4MMyJhIAAADAEF6g==');
              'yews': DTM_Made := DTMFromString('mQwAAAHicY2ZgYChgYmDIAOJiIH4G5D8F4odAHGbCCcf8QD4MMyJhIAAADAEF6g==');
              'magics': DTM_Made := DTMFromString('mQwAAAHicY2ZgYBAFYkkg5gViISgtDsTcrnYMnLbmYJofyIdhRiQMBABShQI+');
            End;
          End;
       'longs':
          Begin
            Case LowerCase(NameUse) of
              'logs': DTM_Made := DTMFromString('mQwAAAHicY2ZgYJjJxMAwGYjnAvEjIP8WEL8G4hnpgkCSEYz5gSQMMyJhIAAAFZAFvA==');
              'oaks': DTM_Made := DTMFromString('mQwAAAHicY2ZgYHBlYmBwBGIvIGZjBAoAMT8Q758jzrC8U4Rhdp0gAz9QGIYZkTAQAADBVgUC');
              'willows': DTM_Made := DTMFromString('mQwAAAHicY2ZgYHACYlsg9gRiISDmBmIZIG6p1WeYNdGMobfNiIEfyIdhRiQMBADArwUL');
              'maples': DTM_Made := DTMFromString('mQwAAAHicY2ZgYHAFYhsg9gViUSDmBWIlID6yegnDiv42hmkNFQz8QD4MMyJhIAAA+coGpA==');
              'yews': DTM_Made := DTMFromString('mQwAAAHicY2ZgYJAAYiEgVgBiQSDmAmIZIO4sF2AoS+cFshgZ+IEkDDMiYSAAAGiGArA=');
              'magics': DTM_Made := DTMFromString('mQwAAAHicY2ZgYBABYj4glgRiUShbDogF81MY+CICgCxGBn4gCcOMSBgIAFgUAks=');
            End;
          End;
       End;
    End;
    procedure SetMake;
    Begin
      Case MakeCombo.ITEMINDEX of
        0:
        Begin
          Writeln('We are going to Shaft');
          Make := 'arrows';
          StoreMethod := 'ranDom';
          DTM_Make := DTMFromString('mWAAAAHicY2FgYPAFYjsgjgZibyCeyMjAsAKK1wDx7tXdDBsX1oLpdQuaGfiBapAxIxoGAQBXYwuJ');
          DTM_Made := DTMFromString('mQwAAAHicY2ZgYChgYmDIAOJiIH4G5D8F4odAHGbCCcf8QD4MMyJhIAAADAEF6g==');
          NFSX1 := 56;
          NFSY1 := 395;
          NFSX2 := 104;
          NFSY2 := 432;
          fx := 73;
          fy := 412;
          MethodStr := 'Shafting';
        End;
        1:
        Begin
          Writeln('We are going to Fletch short bows');
          Make := 'shorts';
          StoreMethod := 'all';
          DTM_Make := DTMFromString('mbQAAAHicY2VgYDgBxJeA+CgQHwbiM0A8hZGBYR4QLwLiyUDcB8QX9kxlOLN7FsPpXVPB+MLe2QwiQLXomBELBgMAx+gR9Q==');
          NFSX1 := 174;
          NFSY1 := 388;
          NFSX2 := 220;
          NFSY2 := 426;
          nfx := 195;
          nfy := 410;

          FSX1 := 69;
          FSY1 := 389;
          FSX2 := 132;
          FSY2 := 423;
          fx := 100;
          fy := 409;
          MethodStr := 'Shortbows';
        End;
        2:
        Begin
          Writeln('We are going to fletch LongBows');
          Make := 'longs';
          StoreMethod := 'all';
          DTM_Make := DTMFromString('mWAAAAHicY2FgYPAFYjsgjgZibyCeyMjAsAKK1wDx7tXdDBsX1oLpdQuaGfiBapAxIxoGAQBXYwuJ');
          NFSX1 := 295;
          NFSY1 := 393;
          NFSX2 := 333;
          NFSY2 := 424;
          nfx := 316;
          nfy := 408;

          FSX1 := 243;
          FSY1 := 398;
          FSX2 := 281;
          FSY2 := 422;
          fx := 253;
          fy := 407;
          MethodStr := 'LongBows';
        End;
      End;
    End;
    procedure SetCompass;
    Begin
      Case CompassCombo.ITEMINDEX of
        0:
        Begin
          Writeln('facing North');
          CompassDegree := 90;   //P07_MakeCompass(CompassDegree + RanDom(10));
          Case LowerCase(ObjectLook) of
            'specific':
            Begin
              DX1 := 237;
              DY1 := 106;
              DX2 := 292;
              DY2 := 168;
            End;
            'broad':
            Begin
              DX1 := 166;
              DY1 := 104;
              DX2 := 513;
              DY2 := 175;
            End;
            'wholescreen':
            Begin
              DX1 := 5;
              DY1 := 5;
              DX2 := 514;
              DY2 := 335;
            End;
          End;
        End;
        1:
        Begin
          Writeln('facing East');
          CompassDegree := 180;
          Case LowerCase(ObjectLook) of
            'specific':
            Begin
              DX1 := 264;
              DY1 := 141;
              DX2 := 323;
              DY2 := 203;
            End;
            'broad':
            Begin
              DX1 := 265;
              DY1 := 53;
              DX2 := 323;
              DY2 := 338;
            End;
            'wholescreen':
            Begin
              DX1 := 5;
              DY1 := 5;
              DX2 := 514;
              DY2 := 335;
            End;
          End;
        End;
        2:
        Begin
          Writeln('facing South');
          CompassDegree := 270;
          Case LowerCase(ObjectLook) of
            'specific':
            Begin
              DX1 := 218;
              DY1 := 160;
              DX2 := 273;
              DY2 := 227;
            End;
            'broad':
            Begin
              DX1 := 10;
              DY1 := 163;
              DX2 := 363;
              DY2 := 229;
            End;
            'wholescreen':
            Begin
              DX1 := 5;
              DY1 := 5;
              DX2 := 514;
              DY2 := 335;
            End;
          End;
        End;
        3:
        Begin
          Writeln('facing West');
          CompassDegree := 1;
          Case LowerCase(ObjectLook) of
            'specific':
            Begin
              DX1 := 209;
              DY1 := 116;
              DX2 := 267;
              DY2 := 189;
            End;
            'broad':
            Begin
              DX1 := 218;
              DY1 := 9;
              DX2 := 258;
              DY2 := 252;
            End;
            'wholescreen':
            Begin
              DX1 := 5;
              DY1 := 5;
              DX2 := 514;
              DY2 := 335;
            End;
          End;
        End;
      End;
    End;
    procedure SetObjectDetection;
    Begin
      Case ObjectAccurateCombo.ITEMINDEX of
        0:
        Begin
          ObjectLook := 'specific';
        End;
        1:
        Begin
          ObjectLook := 'broad';
        End;
        2:
        Begin
          ObjectLook := 'wholescreen';
        End;
      End;
    End;
    procedure SetObject;
    Begin
      Case ObjectCombo.ITEMINDEX of
        0:
        Begin
          Writeln('Draynor Booth');
          ClickMethod := 'booth';
          BankCol_1 := 605006;
          BankTol_1 := 2;
          BankHue_1 := 0.13;
          BankSat_1 := 0.91;
          BankCol_2 := 5725538;
          BankTol_2 := 6;
          BankHue_2 := 0.65;
          BankSat_2 := 0.52;
          BankUpText_1 := 'Use';
          BankUpText_2 := 'Bank';
          BankUpText_3 := 'ooth';
          Col_Fail_1 := 5197656;
          Col_Fail_2 := 132919;
          Col_Fail_3 := 1729887;
          Col_Fail_4 := 1397803;
          Col_Count_1 := 1000;
          Col_Count_2 := 150;
          Col_Count_3 := 500;
          Col_Count_4 := 25;
          LocationStr := 'Draynor';
        End;
        1:
        Begin
          Writeln('Varrock west booth');
          ClickMethod := 'booth';
          BankCol_1 := 1854555;
          BankTol_1 := 6;   // 4
          BankHue_1 := 0.12;
          BankSat_1 := 2.73;
          BankCol_2 := 2839135;
          BankTol_2 := 5;  // 2
          BankHue_2 := 0.33;
          BankSat_2 := 0.84;
          BankUpText_1 := 'Use';
          BankUpText_2 := 'Bank';
          BankUpText_3 := 'ooth';
          Col_Fail_1 := 5197656;
          Col_Fail_2 := 4417654;
          Col_Fail_3 := 5339232;
          Col_Fail_4 := 4685691;
          Col_Count_1 := 300;
          Col_Count_2 := 500;
          Col_Count_3 := 300;
          Col_Count_4 := 250;
          LocationStr := 'Varrock West';
        End;
        2:
        Begin
          Writeln('Seers Bank booth');
          ClickMethod := 'booth';
          BankCol_1 := 3757412;
          BankTol_1 := 2;
          BankHue_1 := 0.00;
          BankSat_1 := 0.00;
          BankCol_2 := 4347489;
          BankTol_2 := 5;
          BankHue_2 := 0.07;
          BankSat_2 := 0.26;
          BankUpText_1 := 'Use';
          BankUpText_2 := 'Bank';
          BankUpText_3 := 'ooth';
          Col_Fail_1 := 5855584;
          Col_Fail_2 := 1533012;
          Col_Fail_3 := 4024685;
          Col_Fail_4 := 12095612;
          Col_Count_1 := 1000;
          Col_Count_2 := 2000;
          Col_Count_3 := 120;
          Col_Count_4 := 100;
          LocationStr := 'Seers Village';
        End;
        3:
        Begin
          Writeln('CastleWars Chest');
          ClickMethod := 'chest';
          BankCol_1 := 3821419;
          BankTol_1 := 8;
          BankHue_1 := 0.05;
          BankSat_1 := 0.09;
          BankCol_2 := 4870246;
          BankTol_2 := 7;
          BankHue_2 := 0.54;
          BankSat_2 := 1.95;
          BankUpText_1 := 'k chest';
          BankUpText_2 := 'Bank che';
          BankUpText_3 := 'ank chest';
          Col_Fail_1 := 12095613;
          Col_Fail_2 := 2380644;
          Col_Fail_3 := 1321290;
          Col_Fail_4 := 6524563;
          Col_Count_1 := 500;
          Col_Count_2 := 600;
          Col_Count_3 := 50;
          Col_Count_4 := 300;
          LocationStr := 'CastleWars';
        End;
        4:
        Begin
          Writeln('Pest Control');
          ClickMethod := 'booth';
          BankCol_1 := 5599869;
          BankTol_1 := 2;
          BankHue_1 := 0.00;
          BankSat_1 := 0.00;
          BankCol_2 := 6847372;
          BankTol_2 := 12;
          BankHue_2 := 0.06;
          BankSat_2 := 0.27;
          BankUpText_1 := 'Use';
          BankUpText_2 := 'Bank';
          BankUpText_3 := 'ooth';
          Col_Fail_1 := 4881028;
          Col_Fail_2 := 1321290;
          Col_Fail_3 := 12095613;
          Col_Fail_4 := 1931122;
          Col_Count_1 := 250;
          Col_Count_2 := 300;
          Col_Count_3 := 1500;
          Col_Count_4 := 500;
          LocationStr := 'Pest Control';
        End;
      End;
    End;
    procedure SetLog;
    Begin
      Case LogCombo.ITEMINDEX of
        0:
        Begin
          Writeln('Logs');
          DTM_Log := DTMFromString('mbQAAAHicY2VgYMhjYmAoAeJUKC4F4iBGBgZPIPYB4nAgDgXionAThvxQY4amZGuG9X0BDC2pNgz8QP3omBELBgMAm6AJ3w==');
          LogUse := 'logs';
          NameUse := 'logs';
          //FletchingStr := 'Normal Logs';
        End;
        1:
        Begin
          Writeln('Oaks');
          DTM_Log := DTMFromString('mggAAAHicY2NgYMhhYmDIAOICIC6D0ulA/Bgo9wqIXwLxCyC+D8X9BS4Mk4tc4XRvnhNDV44jgyBQDhtmxIEhAAAvCw/6');
          LogUse := 'other';
          NameUse := 'oaks';
         // FletchingStr := 'Oaks';
        End;
        2:
        Begin
          Writeln('Willows');
          DTM_Log := DTMFromString('mbQAAAHicY2VgYGAHYj4gZgRiHgYIYANiLiDmhfKZgNjXRZIh1EeOISfZGs4WBIqjY0YsGAwA/rwEfQ==');
          LogUse := 'other';
          NameUse := 'willows';
        End;
        3:
        Begin
          Writeln('Maples');
          DTM_Log := DTMFromString('mbQAAAHicY2VgYAgH4mAgjgfiaCD2B+LfQMzICMHfGCA4yZGDIc+LB4yz3SFYECiOjhmxYDAAAGDmCK0=');
          LogUse := 'other';
          NameUse := 'maples';
        End;
        4:
        Begin
          Writeln('Yews');
          DTM_Log := DTMFromString('mbQAAAHicY2VgYBAFYnEg5gZifiCWAWIBIOYCYh6ovDAQ+1tzMEQ6cjB46XAwxLpBsCBQHB0zYsFgAAD1wAQY');
          LogUse := 'other';
          NameUse := 'yews';
        End;
        5:
        Begin
          Writeln('Magics');
          DTM_Log := DTMFromString('mbQAAAHicY2VgYBACYlEg5gBibiCWAmJBIOYEYl6oHAiH+aozZCfbM4h11TBEB2mD2YJQtciYEQsGAwBVUQXd');
          LogUse := 'other';
          NameUse := 'magics';
        End;
      End;
    End;
    procedure SetMethod;
    Begin
      Case MethodCombo.ITEMINDEX of
        0:
        Begin
          Writeln('We are going to Shaft');
          Method := 'shaft';
        End;
        1:
        Begin
          Writeln('We are going to string');
          Method := 'string';
        End;
        2:
        Begin
          Writeln('We are going to fletch');
          Method := 'fletch';
        End;
      End;
    End;
    procedure UpdateScript(Sender: TObject);
    Begin
      ShowMessage('This feature is not added yet');
    End;
    procedure SaveFormInfo(Sender: TObject);
    Begin
      DsgnForm.ModalResult := mrOk;
      P07_PlayerName := Username.TEXT
      P07_PlayerPass := Password.TEXT
      WithXStr := WithDX1.TEXT
      WithYStr := WithDY1.TEXT
      WithX2Str := WithDX2.TEXT
      WithY2Str := WithDY2.TEXT
      StringXStr := StringX.TEXT
      StringYStr := StringY.TEXT

      WithXInt := StrToInt(WithXStr)
      WithYInt := StrToInt(WithYStr)
      WithX2Int := StrToInt(WithX2Str)
      WithY2Int := StrToInt(WithY2Str)
      StringXInt := StrToInt(StringXStr)
      StringYInt := StrToInt(StringYStr)
      SetMake;
      SetString;
      SetMethod;
      SetLog;
      SetObject;
      SetObjectDetection;
      SetCompass;
      SetMake;
      Setstring;
      SetFailSafeArea;
      SetSpeed;
      SetWithdraw;
      DsgnForm.CLOSE;
    End;

    procedure InitForm;
    Begin
     DsgnForm:=TForm.Create(nil);
      with DsgnForm Do
        Begin
          Caption:='Fast Fletcher 1.0';
          Left:=377;
          Top:=380;
          Width:=360;
          Height:=610;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=0;
      End;
     TLabel0:=TLabel.Create(DsgnForm);
      With TLabel0 Do
        Begin
          Parent:=DsgnForm;
          Caption:='Fast 2007 Fletcher';
          Left:=110;
          Top:=15;
          Width:=99;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=15;
      End;
      FletchLabel:=TLabel.Create(DsgnForm);
      With FletchLabel Do
        Begin
          Parent:=DsgnForm;
          Caption:='Fletching settings';
          Left:=130;
          Top:=110;
          Width:=99;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=11;
      End;
      ObjectAccurateCombo:=TComboBox.Create(DsgnForm);
      With ObjectAccurateCombo Do
        Begin
          Parent:=DsgnForm;
          Left:=230;
          Top:=363;
          Width:=120;
          Height:=15;
          Items.Add('Specific');
          Items.Add('Broad');
          Items.Add('Whole Screen');
          Text := Items[0];
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=8;
      End;
      ObjectAccurate:=TLabel.Create(DsgnForm);
      With ObjectAccurate Do
        Begin
          Parent:=DsgnForm;
          Caption:='Object searching:';
          Left:=145;
          Top:=365;
          Width:=99;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
      MakeLabel:=TLabel.Create(DsgnForm);
      With MakeLabel Do
        Begin
          Parent:=DsgnForm;
          Caption:='Make';
          Left:=90;
          Top:=180;
          Width:=99;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
      MakeCombo:=TComboBox.Create(DsgnForm);
      With MakeCombo Do
        Begin
          Parent:=DsgnForm;
          Left:=130;
          Top:=178;
          Width:=120;
          Height:=15;
          Items.Add('Shafts');
          Items.Add('Short Bows');
          Items.Add('Long Bows');
          Text := Items[0];
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=8;
      End;
     TLabel1:=TLabel.Create(DsgnForm);
      With TLabel1 Do
        Begin
          Parent:=DsgnForm;
          Caption:='Username';
          Left:=33;
          Top:=65;
          Width:=49;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
     TLabel2:=TLabel.Create(DsgnForm);
      With TLabel2 Do
        Begin
          Parent:=DsgnForm;
          Caption:='Password';
          Left:=170;
          Top:=65;
          Width:=47;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
     TLabel3:=TLabel.Create(DsgnForm);
      With TLabel3 Do
        Begin
          Parent:=DsgnForm;
          Caption:='Method';
          Left:=35;
          Top:=140;
          Width:=37;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
     TLabel4:=TLabel.Create(DsgnForm);
      With TLabel4 Do
        Begin
          Parent:=DsgnForm;
          Caption:='Logs to use';
          Left:=165;
          Top:=140;
          Width:=18;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
      AreaLabel:=TLabel.Create(DsgnForm);
      With AreaLabel Do
        Begin
          Parent:=DsgnForm;
          Caption:='Location settings';
          Left:=130;
          Top:=225;
          Width:=18;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=11;
      End;
      FailsafeLabel:=TLabel.Create(DsgnForm);
      With FailsafeLabel Do
        Begin
          Parent:=DsgnForm;
          Caption:='Use Location Failsafe';
          Left:=80;
          Top:=295;
          Width:=18;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
      FailsafeCombo:=TComboBox.Create(DsgnForm);
      With FailSafeCombo Do
        Begin
          Parent:=DsgnForm;
          Left:=190;
          Top:=293;
          Width:=70;
          Height:=15;
          Items.Add('Yes');
          Items.Add('No');
          Text := Items[0];
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=8;
      End;
     TLabel5:=TLabel.Create(DsgnForm);
      With TLabel5 Do
        Begin
          Parent:=DsgnForm;
          Caption:='Direction';
          Left:=205;
          Top:=260;
          Width:=43;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
     Username:=TEdit.Create(DsgnForm);
      With Username Do
        Begin
          Parent:=DsgnForm;
          Text:='Username';
          Left:=83;
          Top:=63;
          Width:=80;
          Height:=21;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
     Password:=TEdit.Create(DsgnForm);
      With Password Do
        Begin
          Parent:=DsgnForm;
          Text:='Password';
          Left:=220;
          Top:=63;
          Width:=80;
          Height:=21;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
          Password.MaxLength:=21;
          Password.PasswordChar:=#;
      End;
      OtherLabel:=TLabel.Create(DsgnForm);
      With OtherLabel Do
        Begin
          Parent:=DsgnForm;
          Caption:='Other Settings';
          Left:=150;
          Top:=335;
          Width:=99;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=11;
      End;
      SpeedLabel:=TLabel.Create(DsgnForm);
      With SpeedLabel Do
        Begin
          Parent:=DsgnForm;
          Caption:='Fletching Speed';
          Left:=1;
          Top:=365;
          Width:=99;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
      SpeedCombo:=TComboBox.Create(DsgnForm);
      With SpeedCombo Do
        Begin
          Parent:=DsgnForm;
          Left:=80;
          Top:=363;
          Width:=60;
          Height:=15;
          Items.Add('Slow');
          Items.Add('Normal');
          Items.Add('Fast');
          Text := Items[0];
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=8;
      End;
     MethodCombo:=TComboBox.Create(DsgnForm);
      With MethodCombo Do
        Begin
          Parent:=DsgnForm;
          Left:=77;
          Top:=138;
          Width:=80;
          Height:=15;
          Items.Add('Shaft');
          Items.Add('String');
          Items.Add('Fletch');
          Text := Items[0];
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=8;
      End;
      CustomLabel:=TLabel.Create(DsgnForm);
      With CustomLabel Do
        Begin
          Parent:=DsgnForm;
          Caption:='Custom Settings';
          Left:=145;
          Top:=395;
          Width:=99;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=11;
      End;
      StringLabel:=TLabel.Create(DsgnForm);
      With StringLabel Do
        Begin
          Parent:=DsgnForm;
          Caption:='Stringing';
          Left:=5;
          Top:=425;
          Width:=99;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
      StringXLabel:=TLabel.Create(DsgnForm);
      With StringXLabel Do
        Begin
          Parent:=DsgnForm;
          Caption:='X:';
          Left:=10;
          Top:=455;
          Width:=99;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
      StringYLabel:=TLabel.Create(DsgnForm);
      With StringYLabel Do
        Begin
          Parent:=DsgnForm;
          Caption:='Y:';
          Left:=80;
          Top:=455;
          Width:=99;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
      WithDX1:=TEdit.Create(DsgnForm);
      With WithDX1 Do
        Begin
          Parent:=DsgnForm;
          Text:='0';
          Left:=175;
          Top:=470;
          Width:=40;
          Height:=21;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
     WithDY1:=TEdit.Create(DsgnForm);
      With WithDY1 Do
        Begin
          Parent:=DsgnForm;
          Text:='0';
          Left:=270;
          Top:=470;
          Width:=40;
          Height:=21;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
          Password.MaxLength:=21;
      End;
      WithDX2:=TEdit.Create(DsgnForm);
      With WithDX2 Do
        Begin
          Parent:=DsgnForm;
          Text:='0';
          Left:=270;
          Top:=520;
          Width:=40;
          Height:=21;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
     WithDY2:=TEdit.Create(DsgnForm);
      With WithDY2 Do
        Begin
          Parent:=DsgnForm;
          Text:='0';
          Left:=175;
          Top:=520;
          Width:=40;
          Height:=21;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
          Password.MaxLength:=21;
      End;
      StringX:=TEdit.Create(DsgnForm);
      With StringX Do
        Begin
          Parent:=DsgnForm;
          Text:='0';
          Left:=30;
          Top:=450;
          Width:=40;
          Height:=21;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
     StringY:=TEdit.Create(DsgnForm);
      With StringY Do
        Begin
          Parent:=DsgnForm;
          Text:='0';
          Left:=100;
          Top:=450;
          Width:=40;
          Height:=21;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
          Password.MaxLength:=21;
      End;
      StringCombo:=TComboBox.Create(DsgnForm);
      With StringCombo Do
        Begin
          Parent:=DsgnForm;
          Left:=50;
          Top:=422;
          Width:=115;
          Height:=15;
          Items.Add('Use Built-in DTMs');
          Items.Add('Use slot 14 & 15');
          Items.Add('Custom Coords');
          Text := Items[0];
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=8;
      End;
      WithDLabel:=TLabel.Create(DsgnForm);
      With WithDLabel Do
        Begin
          Parent:=DsgnForm;
          Caption:='WithDrawing';
          Left:=165;
          Top:=425;
          Width:=99;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
      WithXLabel:=TLabel.Create(DsgnForm);
      With WithXLabel Do
        Begin
          Parent:=DsgnForm;
          Caption:='X:';
          Left:=160;
          Top:=473;
          Width:=99;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
      WithX2Label:=TLabel.Create(DsgnForm);
      With WithX2Label Do
        Begin
          Parent:=DsgnForm;
          Caption:='X:';
          Left:=160;
          Top:=523;
          Width:=99;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
      WithYLabel:=TLabel.Create(DsgnForm);
      With WithYLabel Do
        Begin
          Parent:=DsgnForm;
          Caption:='Y:';
          Left:=250;
          Top:=473;
          Width:=99;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
      WithY2Label:=TLabel.Create(DsgnForm);
      With WithY2Label Do
        Begin
          Parent:=DsgnForm;
          Caption:='Y:';
          Left:=250;
          Top:=523;
          Width:=99;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
      Slot1Label:=TLabel.Create(DsgnForm);
      With Slot1Label Do
        Begin
          Parent:=DsgnForm;
          Caption:='Slot 1';
          Left:=225;
          Top:=450;
          Width:=99;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
      Slot2Label:=TLabel.Create(DsgnForm);
      With Slot2Label Do
        Begin
          Parent:=DsgnForm;
          Caption:='Slot 2';
          Left:=225;
          Top:=500;
          Width:=99;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
      WithdrawCombo:=TComboBox.Create(DsgnForm);
      With WithDrawCombo Do
        Begin
          Parent:=DsgnForm;
          Left:=235;
          Top:=423;
          Width:=120;
          Height:=15;
          Items.Add('Use Built-in DTMs');
          Items.Add('First & Second Bank slot');
          Items.Add('Custom Coords');
          Text := Items[0];
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=8;
      End;
      ObjectLabel:=TLabel.Create(DsgnForm);
      With ObjectLabel Do
        Begin
          Parent:=DsgnForm;
          Caption:='Object';
          Left:=30;
          Top:=260;
          Width:=99;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
      ObjectCombo:=TComboBox.Create(DsgnForm);
      With ObjectCombo Do
        Begin
          Parent:=DsgnForm;
          Left:=65;
          Top:=258;
          Width:=130;
          Height:=15;
          Items.Add('Draynor Booth');
          Items.Add('Varrock West Booth');
          Items.Add('Cammy Bank Booth');
          Items.Add('Chest(CastleWars)');
          Items.Add('Pest Control');
          Text := Items[0];
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=8;
      End;
     LogCombo:=TComboBox.Create(DsgnForm);
      With LogCombo Do
        Begin
          Parent:=DsgnForm;
          Left:=225;
          Top:=138;
          Width:=80;
          Height:=15;
          Items.Add('Logs');
          Items.Add('Oak');
          Items.Add('Willow');
          Items.Add('Maple');
          Items.Add('Yew');
          Items.Add('Magic');
          Text := Items[0];
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=9;
      End;
     StartButton:=TButton.Create(DsgnForm);
      With StartButton Do
        Begin
          Parent:=DsgnForm;
          Caption:='Start';
          Left:=60;
          Top:=560;
          Width:=240;  //75
          Height:=25;
          OnClick:=@SaveFormInfo
          Font.Size:=8;
      End;
      UpdateButton:=TButton.Create(DsgnForm);
      With UpdateButton Do
        Begin
          Parent:=DsgnForm;
          Caption:='Update';
          Left:=60;
          Top:=585;
          Width:=240; //75
          Height:=25;
          Font.Size:=8;
          OnClick:=@UpdateScript
      End;
     CompassCombo:=TComboBox.Create(DsgnForm);
      With CompassCombo Do
        Begin
          Parent:=DsgnForm;
          Left:=255;
          Top:=258;
          Width:=70;
          Height:=21;
          Items.Add('North');
          Items.Add('East');
          Items.Add('South');
          Items.Add('West');
          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;
    Procedure SetupFletcherInclude;
    Begin
      SafeInitForm;
      SafeShowFormModal;
    End;

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

    Default

    Quote Originally Posted by RJJ95 View Post
    The procedure is all the way at the bottom of the include script
    Sounds like you called the setup somewhere before the procedure was declaired

    Is that procedure in the TForm include or another one? You need the other one before the TForm include if it's in a different one
    Last edited by DannyRS; 03-10-2013 at 01:36 AM.


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

  5. #5
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    Sounds like you called the setup somewhere before the procedure was declaired

    Is that procedure in the TForm include or another one? You need the other one before the TForm include if it's in that one
    So do I put it in the main script? because when I do I get another error

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

    Default

    Quote Originally Posted by RJJ95 View Post
    So do I put it in the main script? because when I do I get another error
    You should just call it in a script yea, whats the other error?

    Are you sure you put your Include in the correct place your trying to access (just in the Includes folder in this case)


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

  7. #7
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Unknown identifier 'SafeInitForm'

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

    Default

    Quote Originally Posted by RJJ95 View Post
    Unknown identifier 'SafeInitForm'
    Your Include is not being included into your script correctly, put it in the correct place/change the file location in the script? Does this really need to be an Include, why not just keep it as one script?


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

  9. #9
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    Your Include is not being included into your script correctly, put it in the correct place/change the file location in the script? Does this really need to be an Include, why not just keep it as one script?
    Because its 2400 lines long lol

  10. #10
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    arrays are your friend.

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

    Default

    Quote Originally Posted by RJJ95 View Post
    Because its 2400 lines long lol
    No ones going to read it likely, and your just going to get spammed about trouble installing an Include not worth it IMO, but you made Includes before, do it how you did it then you just missed something somewhere!


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

  12. #12
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    No ones going to read it likely, and your just going to get spammed about trouble installing an Include not worth it IMO, but you made Includes before, do it how you did it then
    Not with a Tform I just learned how to use them. All I know about a include is it's pretty much a script on top of your current script

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

    Default

    Quote Originally Posted by RJJ95 View Post
    Not with a Tform I just learned how to use them. All I know about a include is it's pretty much a script on top of your current script
    Same with the TForm, I'd guess at least as I don't use em myself, put the functions/procedures/variables in the Include without the program call


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

  14. #14
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    Same with the TForm, I'd guess at least as I don't use em myself, put the functions/procedures/variables in the Include without the program call
    Did, then it does not bring up the form :s

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

    Default

    Quote Originally Posted by RJJ95 View Post
    Did, then it does not bring up the form :s
    So theres something you didn't call in the setup that you need too? That you did call in your first script


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

  16. #16
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    So theres something you didn't call in the setup that you need too? That you did call in your first script
    This is what I called to setup the Tform:
    SafeInitForm;
    SafeShowFormModal;

    But when I put it in the script I get

    Unknown identifier 'SafeInitForm'

  17. #17
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Post the script. You probably included it only after calling the procedure.

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
  •