Results 1 to 3 of 3

Thread: while procedure help thing

  1. #1
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default while procedure help thing

    Ok i have a "while do"procedure.
    I want it to do all of the following below it but it wont compile.
    this is the procedure.


    Code:
    procedure fightingwaitandantirandoms;
    begin
    while(wizardbam)or
    while(MortalDraw)then
    do
    findnormalrandoms;
    hatetherandoms
    findthetrade;
    outfight;
    hatenoobcallers;
    strlvl;
    attlvl;
    deflvl;
    whatsup;
    hello;
    friends;
    end;
    the error..

    Code:
    Failed when compiling
    Line 255: [Error] (20105:1): Syntax error in script C:\Program Files\SCAR 2.03\Scripts\autofighter v2.5.scar
    And i need help with a typing skill level here are the procedures

    Code:
    procedure strlevel;
    begin
    if (inchat('str lvl'))or
       (inchat('str level'))or
       (inchat('stre lvl'))or
       (inchat('strength lvl'))or
       (inchat('strength level'))then
       typesend(inttostr(getskilllevel('strength')
    end;
    
    procedure attlvl;
    begin
    if (inchat('att lvl'))or
       (inchat('att level'))or
       (inchat('atack lvl'))or
       (inchat('atack level'))or
       (inchat('attack lvl'))or
       (inchat('attack level'))then
       typesend(inttostr(grabskilllevel('attack')
    end;
    
    procedure deflvl;
    begin
    if (inchat('def lvl'))or
       (inchat('def level'))or
       (inchat('defenc lvl'))or
       (inchat('defence level'))or
       (inchat('defenc level'))or
       (inchat('defence level'))then
       typesend(inttostr(getskilllevel('defence')
    end;
    the error...

    Code:
    Failed when compiling
    Line 287: [Error] (20137:1): comma (',') expected in script C:\Program Files\SCAR 2.03\Scripts\autofighter v2.5.scar
    Thank you for your assistance.

  2. #2
    Join Date
    Dec 2006
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    for the first problem (assuming you would like everything looped)
    SCAR Code:
    procedure fightingwaitandantirandoms;
    begin
      while((wizardbam)or(MortalDraw))do
      begin
        findnormalrandoms;
        hatetherandoms  
        findthetrade;
        outfight;
        hatenoobcallers;
        strlvl;
        attlvl;
        deflvl;
        whatsup;
        hello;
        friends;      
      end;//loop
    end;//procedure
    For the second problem, you are missing close brakcets, you have
    SCAR Code:
    typesend(inttostr(getskilllevel('strength')
    when it should be
    SCAR Code:
    typesend(inttostr(getskilllevel('strength')))

    (you need to fix that last problem in all 3 procedures)

  3. #3
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok i understand now.
    thanks alot nucular.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Procedure TypeSendRandom & Procedure AutoResponder!
    By Ultra in forum Research & Development Lounge
    Replies: 12
    Last Post: 01-08-2008, 07:04 PM
  2. Replies: 8
    Last Post: 05-24-2007, 11:57 PM
  3. Just one more thing about VMs :/
    By PwNZoRNooB in forum News and General
    Replies: 7
    Last Post: 05-21-2007, 07:45 PM
  4. Procedure that calls random procedure?
    By Secet in forum OSR Help
    Replies: 2
    Last Post: 03-03-2007, 03:56 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
  •