Results 1 to 4 of 4

Thread: Unknown identifier?

  1. #1
    Join Date
    Jan 2013
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default Unknown identifier?

    So at the moment I'm attempting to learn how to script in simba and I'm running into a few problems with my scripts, I'm not really sure about everything I'm doing so I figured I'd ask the community since you all seem pretty helpful.

    What I'm attempting to do with my script at the moment is make it find logs in the bank using a DTM but am getting an error with
    Code:
    If FindDTM(Log, X, Y, MSX1, MSY1, MSX2, MSY2);
    Saying X is an unknown identifier, though in YoHoJo's videos it worked perfectly.

    Full script is, if I'm doing something wrong earlier on please let me know.

    Code:
    program dtmtest;
    {$i srl/srl.simba}
    
    var
      Log: Integer;
    
    
    begin
    
      SetupSRL;
    
      Log := DTMFromString('mlwAAAHicY2dgYJBkZGBQAWJuIJYGYg0g5gdieSDmAmIOIBYCYjEgFgRiTiBmAOKSED0IAwsWYcANsOuAYCgAAO5kAjo=');
    
      If FindDTM(Log, X, Y, MSX1, MSY1, MSX2, MSY2);
      Begin
        WriteIn('Found Logs');
        MMouse(x, y, 7, 7);
        If IsUpText('Logs') Then
        Mouse(x, y, 0, 0, True);
      End;
    
    
      FreeDTM(Log);
    
    end.

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

    Default

    Since Pascal is a strongly typed language, x and y remain 'unknown' to the compiler until they are declared.
    So include them in your var declaration:
    Simba Code:
    var
      Log, x, y: Integer;

  3. #3
    Join Date
    Mar 2012
    Location
    San Diego
    Posts
    760
    Mentioned
    4 Post(s)
    Quoted
    91 Post(s)

    Default

    Be sure to add "x, y" under the "var"

    Simba Code:
    var
      Log: Integer;

    to

    Simba Code:
    var
      x, y, Log: Integer;

  4. #4
    Join Date
    Jan 2013
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Thank you both very much.

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
  •