Results 1 to 14 of 14

Thread: Undeclared Identifier Help!

  1. #1
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default Undeclared Identifier Help!

    Well here is the script, i'll be grateful if you help me :
    SCAR Code:
    unit Unit1;

    interface

    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls;

    type
      TForm1 = class(TForm)
        Label1: TLabel;
        Edit1: TEdit;
        Label2: TLabel;
        Edit2: TEdit;
        Button1: TButton;
        Label3: TLabel;
        Label4: TLabel;
        procedure DoMath;
      private

      public

      end;

    var
      Form1: TForm1;

    implementation

    {$R *.dfm}

    procedure DoMath(Sender: TObject);
    var
      i, c,hl, hs: Integer;
    begin
      hs:=StrToInt(TForm.Edit2);
      hl:=StrToInt(TForm.Edit1);
      c:=hs-90/99;
      i:=hs/c/120+2/4*hl-72;
      Label4.Caption:=IntToStr(i)+'%';
    end;

    end.

    Thanks!
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  2. #2
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default

    SCAR Code:
    procedure TForm1.DoMath;
    var
      hl, hs, i: Integer;
      c, e: Extended;
    begin
      hs := StrToInt(Form1.Edit2);
      hl := StrToInt(Form1.Edit1);
      c := hs - 90 / 99;
      e := hs / c / 120 + 2 / 4 * hl - 72;
      i := Round(e);
      Label4.Caption := IntToStr(i) + '%';
    end;

    (You sure you know what you're doing? =/)

  3. #3
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Freddy1990 View Post
    SCAR Code:
    procedure TForm1.DoMath;
    var
      hl, hs, i: Integer;
      c, e: Extended;
    begin
      hs := StrToInt(Form1.Edit2);
      hl := StrToInt(Form1.Edit1);
      c := hs - 90 / 99;
      e := hs / c / 120 + 2 / 4 * hl - 72;
      i := Round(e);
      Label4.Caption := IntToStr(i) + '%';
    end;
    Thanks.
    Quote Originally Posted by Freddy1990
    (You sure you know what you're doing? =/)
    Nope, no idea

    EDIT: Ok, after trying your procedure, i got this error:
    Code:
    [Error] Unit1.pas(37): Incompatible types: 'String' and 'TEdit'
    and this error:
    Code:
    [Error] Unit1.pas(38): Incompatible types: 'String' and 'TEdit'
    .
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  4. #4
    Join Date
    May 2006
    Location
    Qld, Australia
    Posts
    223
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Code:
      hs := StrToInt(Form1.Edit2.Text);
      hl := StrToInt(Form1.Edit1.Text);
    Haven't scripted in a while, Willing to proofread, test and provide feedback.

  5. #5
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default

    Ah, missed that, didn't really bother to open my IDE to test it anyway

  6. #6
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Kevin Wolf View Post
    Code:
      hs := StrToInt(Form1.Edit2.Text);
      hl := StrToInt(Form1.Edit1.Text);
    Thanks Nashi!
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  7. #7
    Join Date
    May 2006
    Location
    Qld, Australia
    Posts
    223
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Haha How'd you know xP

    Oh my siggy XD
    Haven't scripted in a while, Willing to proofread, test and provide feedback.

  8. #8
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Kevin Wolf View Post
    Haha How'd you know xP

    Oh my siggy XD
    Not really your siggy. It's just on MoparIsTheBest, i saw your name had a SCAR Scripter tag next to it, and i was wondering why you aren't on SRL. So i searched and found the your members application, then you posted that Nashi was you and you liked that name better.

    So i thought you'd like to be called that instead
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  9. #9
    Join Date
    May 2006
    Location
    Qld, Australia
    Posts
    223
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes I would, XD
    I don't like Kevin Wolf =[
    I want NASHI T_T
    Haven't scripted in a while, Willing to proofread, test and provide feedback.

  10. #10
    Join Date
    Jan 2007
    Location
    Kansas
    Posts
    3,760
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    http://www.villavu.com/forum/showthread.php?t=17786

    Try that if you haven't already, they might not change it.


  11. #11
    Join Date
    May 2006
    Location
    Qld, Australia
    Posts
    223
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I have =/
    Haven't scripted in a while, Willing to proofread, test and provide feedback.

  12. #12
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Kevin Wolf View Post
    I have =/
    Then SPAM the thread mate.
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  13. #13
    Join Date
    May 2006
    Location
    Qld, Australia
    Posts
    223
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nah, I don't want to annoy them
    Haven't scripted in a while, Willing to proofread, test and provide feedback.

  14. #14
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Kevin Wolf View Post
    Nah, I don't want to annoy them
    It's fun, try it. What ever you spam they'll do to your biddings.
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Identifier Help
    By Rora in forum OSR Help
    Replies: 2
    Last Post: 12-16-2007, 10:59 PM
  2. Identifier help
    By Rora in forum OSR Help
    Replies: 3
    Last Post: 11-14-2007, 07:26 PM
  3. help with 3.10 identifier
    By fastler in forum OSR Help
    Replies: 4
    Last Post: 07-17-2007, 12:43 PM
  4. identifier
    By macromacro123 in forum OSR Help
    Replies: 1
    Last Post: 03-06-2007, 04:10 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
  •