Results 1 to 3 of 3

Thread: Where is the Error?

  1. #1
    Join Date
    Apr 2012
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Where is the Error?

    Sitting here for 15 minutes trying to find this error which Simba is showing. Im new to scripting so it might be something i don't know about, hopefully one of the more experienced scripters can help me out.

    Private Server Script.

    Simba Code:
    begin
    if(FindColor(x,y,HP,220,120,286,153)) then
      begin
     Writeln('Eating > Using selected food.')
         Wait(randomrange(1200, 1300));

    if (FindColor(x,y,Sword,556,256,724,451))  then
     begin
      MoveMouse(x,y+random(3));
       Wait(randomrange(500, 700));
      ClickMouse(x,y,mouse_Left);
       Wait(randomrange(300, 450));
      end;

        MoveMouse(642,183); //Move to BackPack
        Wait(randomrange(20, 30));
      ClickMouse(642,183,1); //Click BackPack
     end;
    end; //Showing Error Here.

    Thanks in advance, Example
    << Newbie Scripter >>
    Release First Script [ ]
    100 Posts [ ]
    250 Posts [ ]


  2. #2
    Join Date
    Mar 2012
    Location
    Over there
    Posts
    840
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    Did you call it in a procedure? I just compiled this in Simba

    Simba Code:
    procedure blahblah;
    var
      x, y : Integer;
    begin
    if(FindColor(x,y,111,220,120,286,153)) then
      begin
     Writeln('Eating > Using selected food.')
         Wait(randomrange(1200, 1300));

    if (FindColor(x,y,111,556,256,724,451))  then
     begin
      MoveMouse(x,y+random(3));
       Wait(randomrange(500, 700));
      ClickMouse(x,y,mouse_Left);
       Wait(randomrange(300, 450));
      end;

        MoveMouse(642,183); //Move to BackPack
        Wait(randomrange(20, 30));
      ClickMouse(642,183,1); //Click BackPack
     end;
    end; //Showing Error Here.
    Compiled successfully in 546 ms.

  3. #3
    Join Date
    Apr 2012
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by TotalKillz View Post
    Did you call it in a procedure? I just compiled this in Simba

    Simba Code:
    procedure blahblah;
    var
      x, y : Integer;
    begin
    if(FindColor(x,y,111,220,120,286,153)) then
      begin
     Writeln('Eating > Using selected food.')
         Wait(randomrange(1200, 1300));

    if (FindColor(x,y,111,556,256,724,451))  then
     begin
      MoveMouse(x,y+random(3));
       Wait(randomrange(500, 700));
      ClickMouse(x,y,mouse_Left);
       Wait(randomrange(300, 450));
      end;

        MoveMouse(642,183); //Move to BackPack
        Wait(randomrange(20, 30));
      ClickMouse(642,183,1); //Click BackPack
     end;
    end; //Showing Error Here.
    Compiled successfully in 546 ms.
    Literally just figured it out, as you say i was missing the procedure. Been a long day and im tired, it just didn't click at first

    Lesson Learned. Don't attempt to script or you will be sitting there for a few hours trying to figure out a simple mistake.
    << Newbie Scripter >>
    Release First Script [ ]
    100 Posts [ ]
    250 Posts [ ]


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
  •