Results 1 to 8 of 8

Thread: Form Error

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

    Default Form Error

    Code:
    [Runtime Error] : Could not call proc in line 208 in script C:\Documents and Settings\Administrator\Desktop\1337script.scar
    SCAR Code:
    procedure report;
    begin
      custdebug.Lines.Add('The Debug Box'); // <- Line 208
      custdebug.Lines.Add('ZaszMedia Presents...');
      custdebug.Lines.Add('');
      custdebug.Lines.Add('.:''Bowman 1.0'':.');
      custdebug.Lines.Add('Time Running: '+ timerunning);
      custdebug.Lines.Add('User: '+username);
      custdebug.Lines.Add('Loads: '+inttostr(s)+' Loads');
      custdebug.Lines.Add('Done '+inttostr(logdone)+'/'+inttostr(total)+' and '+inttostr(todo)+' '+players[currentplayer].strings[1]+' logs left');

    end;

    I have the form and everthing loaded first.
    I do visit every 2-6 months

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

    Default

    Paste the whole form here, it may be a problem with the show form procedures

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

    Default

    SCAR Code:
    procedure initform;
    begin
    frmDesign := CreateForm;
    frmDesign.Left := 250;
    frmDesign.Top := 114;
    frmDesign.Width := 484;
    frmDesign.Height := 480;
    frmDesign.Caption := 'ZaszMedia Present'#39's BowMan 1.0';
    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 := 32;
    Label1.Top := 72;
    Label1.Width := 92;
    Label1.Height := 13;
    Label1.Caption := 'Player 1 Username:';
    Label2 := TLabel.Create(frmDesign);
    Label2.Parent := frmDesign;
    Label2.Left := 32;
    Label2.Top := 96;
    Label2.Width := 90;
    Label2.Height := 13;
    Label2.Caption := 'Player 1 Password:';
    Label3 := TLabel.Create(frmDesign);
    Label3.Parent := frmDesign;
    Label3.Left := 248;
    Label3.Top := 72;
    Label3.Width := 92;
    Label3.Height := 13;
    Label3.Caption := 'Player 2 Username:';
    Label4 := TLabel.Create(frmDesign);
    Label4.Parent := frmDesign;
    Label4.Left := 248;
    Label4.Top := 96;
    Label4.Width := 90;
    Label4.Height := 13;
    Label4.Caption := 'Player 2 Password:';
    Label5 := TLabel.Create(frmDesign);
    Label5.Parent := frmDesign;
    Label5.Left := 248;
    Label5.Top := 32;
    Label5.Width := 187;
    Label5.Height := 13;
    Label5.Caption := 'Leave Player 2 Blank if you will not use.';
    Label6 := TLabel.Create(frmDesign);
    Label6.Parent := frmDesign;
    Label6.Left := 32;
    Label6.Top := 128;
    Label6.Width := 166;
    Label6.Height := 13;
    Label6.Caption := 'Type of Log: (log, oak, maple, yew)';
    Label7 := TLabel.Create(frmDesign);
    Label7.Parent := frmDesign;
    Label7.Left := 88;
    Label7.Top := 160;
    Label7.Width := 107;
    Label7.Height := 13;
    Label7.Caption := 'How Many Logs to do:';
    startscript := TButton.Create(frmDesign);
    startscript.Parent := frmDesign;
    startscript.Left := 288;
    startscript.Top := 360;
    startscript.Width := 97;
    startscript.Height := 25;
    startscript.Caption := 'Start';
    startscript.TabOrder := 8;
    startscript.OnClick := @scriptloop;
    cancelscript := TButton.Create(frmDesign);
    cancelscript.Parent := frmDesign;
    cancelscript.Left := 72;
    cancelscript.Top := 360;
    cancelscript.Width := 97;
    cancelscript.Height := 25;
    cancelscript.Caption := 'Cancel';
    cancelscript.TabOrder := 9;
    cancelscript.onclick := @scriptloop;
    p1username := TEdit.Create(frmDesign);
    p1username.Parent := frmDesign;
    p1username.Left := 136;
    p1username.Top := 64;
    p1username.Width := 89;
    p1username.Height := 21;
    p1username.TabOrder := 10;
    p1password := TEdit.Create(frmDesign);
    p1password.Parent := frmDesign;
    p1password.Left := 136;
    p1password.Top := 96;
    p1password.Width := 89;
    p1password.Height := 21;
    p1password.PasswordChar := '*';
    p1password.TabOrder := 11;
    custdebug := TMemo.Create(frmDesign);
    custdebug.Parent := frmDesign;
    custdebug.Left := 88;
    custdebug.Top := 192;
    custdebug.Width := 265;
    custdebug.Height := 129;
    custdebug.TabOrder := 12;
    p2username := TEdit.Create(frmDesign);
    p2username.Parent := frmDesign;
    p2username.Left := 352;
    p2username.Top := 64;
    p2username.Width := 89;
    p2username.Height := 21;
    p2username.TabOrder := 13;
    p2password := TEdit.Create(frmDesign);
    p2password.Parent := frmDesign;
    p2password.Left := 352;
    p2password.Top := 96;
    p2password.Width := 89;
    p2password.Height := 21;
    p2password.PasswordChar := '*';
    p2password.TabOrder := 14;
    logtype := TEdit.Create(frmDesign);
    logtype.Parent := frmDesign;
    logtype.Left := 216;
    logtype.Top := 128;
    logtype.Width := 97;
    logtype.Height := 21;
    logtype.TabOrder := 15;
    hmtd := TEdit.Create(frmDesign);
    hmtd.Parent := frmDesign;
    hmtd.Left := 216;
    hmtd.Top := 160;
    hmtd.Width := 97;
    hmtd.Height := 21;
    hmtd.TabOrder := 16;
    end;

    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 report;
    begin
      custdebug.Lines.Add('The Debug Box');
      custdebug.Lines.Add('ZaszMedia Presents...');
      custdebug.Lines.Add('');
      custdebug.Lines.Add('.:''Bowman 1.0'':.');
      custdebug.Lines.Add('Time Running: '+ timerunning);
      custdebug.Lines.Add('User: '+username);
      custdebug.Lines.Add('Loads: '+inttostr(s)+' Loads');
      custdebug.Lines.Add('Done '+inttostr(logdone)+'/'+inttostr(total)+' and '+inttostr(todo)+' '+players[currentplayer].strings[1]+' logs left');

    end;

    There you go.
    I do visit every 2-6 months

  4. #4
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    paste the vars and stuff too im lazy. you can put that proc in the middle of the SafeInitModal; and ShowForm; or watever procedures and it will work. when are you calling that procedure? post the whole script so i can take a look.

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

    Default

    SCAR Code:
    procedure scriptloop(sender: TObject);
    begin
      frmDesign.ModalResult:= mrOk;
      activateclient;
      repeat
      wait(2000+random(2000));
      openthebank;
      if foundbanker then
      begin
        withdrawl;
        foundbanker := false;
        logonknifect;
        hoverovertheskill;
        fletchwait;
        bankthebows;
        foundbanker := false;
        doneall;
        report;
      end;
      until false;
    end;

    begin
      setupscript;
      report;
      SafeInitForm;
      SafeShowFormModal;
    end.

    SCAR Code:
    var timed,todo,logdone,s,x,y:integer;
    username: string;
    foundbanker : boolean;
      frmDesign : TForm;
      Label1 : TLabel;
      Label2 : TLabel;
      Label3 : TLabel;
      Label4 : TLabel;
      Label5 : TLabel;
      Label6 : TLabel;
      Label7 : TLabel;
      startscript : TButton;
      cancelscript : TButton;
      p1username : TEdit;
      p1password : TEdit;
      custdebug : TMemo;
      p2username : TEdit;
      p2password : TEdit;
      logtype : TEdit;
      hmtd : TEdit;

    Don't want to post whole script cause of leechers.
    I do visit every 2-6 months

  6. #6
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    theres your problem. if you are running script while form is up it won't work. it is modal which means pauses script while form is up. and you can't add stuff to a memobox when form isnt loaded. you can try putting a report string and adding that to it then at end pasting the string into box. for more help you could talk to me on msn kylewollaston@hotmail.com

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

    Default

    Wow Da 0wner your knowledge about forms is all knowing .

  8. #8
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wha? I didn't get you. But you are good at forms too . Why you never add me on msn? kylewollaston@hotmail.com

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Form Error
    By ZaSz in forum OSR Help
    Replies: 6
    Last Post: 02-17-2008, 01:51 AM
  2. Form Error Help Plz
    By Bonfield in forum OSR Help
    Replies: 5
    Last Post: 07-25-2007, 02:58 PM

Posting Permissions

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