Results 1 to 6 of 6

Thread: Syntax error in script

  1. #1
    Join Date
    Jun 2007
    Posts
    29
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Syntax error in script

    SCAR Code:
    MarkTime(finding);
      repeat
        Wait(50+random(100))
        antiban;
        if (TimeFromMark(finding)=<60000) then
        begin
          writeln('trouble finding'+IntToStr(dtm)+ '>.< exiting script');
          LogOut;
          TerminateScript;
        end;

    i was wondering what i need to change with the TimFromMark part of the script so that the script runs smoothly as i have this procedure in other places(no exactly the same) in my script and they seem to work fine

    also how does scar work with the less than and greater than symbols, because i though it was 2<5 but scar seems to work as 2>5?

    edit: i am also having trouble with this line of my script
    SCAR Code:
    until(FindDTM(dtm,x,y,search[1], search[2], search[3], search[4]));
    'dtm' is the dtm the player states - i'll upload my script

    edit: edit: im still haveing type missmatch with this
    SCAR Code:
    until(FindDTM(dtm,x,y,search[0], search[1], search[2], search[3]));

  2. #2
    Join Date
    Jan 2007
    Location
    Ausrtalia, Melbourne
    Posts
    209
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nice, really nice, awesome

  3. #3
    Join Date
    Jun 2007
    Posts
    29
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ty but i need help fixing the errors

  4. #4
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    2 > 5, returns true if 2 is bigger than 5
    2 < 5, returns true if 2 is smaller than 5
    2 = 5, returns true if 2 equals 5.
    2 >= 5, returns true if 2 is 5 or bigger.
    2 <= 5, returns true if 2 is 5 or smaller.

    SCAR Code:
    if (TimeFromMark(finding)=<60000) then
    you switched the < and = , but I think you mean >=.

    SCAR Code:
    until(FindDTM(dtm,x,y,search[1], search[2], search[3], search[4]));

    I think you mean Info[0], Info[1], Info[2], Info[3]
    Hup Holland Hup!

  5. #5
    Join Date
    Jun 2007
    Posts
    29
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ty for your help nielsie95 but i'm still getting typemissmatch with

    SCAR Code:
    until(FindDTM(dtm,x,y,search[0], search[1], search[2], search[3]));

  6. #6
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    He said to replace 'search' with 'info'. Anyway, if you're sure that's right, make sure they contain numbers by commenting out the line then doing a 'writeln(IntToStr(search[0]));' just to make sure it is an int. If it's not, just try different '*tostr' functions until you get it.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Line 135: [Error] (14845:1): Syntax error in script
    By AbsTrACt'^.| in forum OSR Help
    Replies: 16
    Last Post: 05-23-2008, 01:14 PM
  2. Replies: 5
    Last Post: 02-26-2008, 04:14 PM
  3. Replies: 6
    Last Post: 01-09-2008, 04:23 AM
  4. Syntax Error...
    By Jacobdm0 in forum OSR Help
    Replies: 5
    Last Post: 07-17-2007, 04:08 AM

Posting Permissions

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