Results 1 to 11 of 11

Thread: help with script

  1. #1
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default help with script

    SCAR Code:
    begin
      if (finditemname('Coins') = false) then
        begin
        decline;
           case random(5) of

              1: typesend('sorry, not enough cash');

              2: typesend('Whoops, no money');

              3: typesend('nvm my friend has one for me');

              4: typesend('whoops wrong person');

              5: typesend('nvm ill just get one myself');
    line 116   end else;
    end;

    get error Line 116: [Error] (16351:5): Identifier expected in script C:\Program Files\SCAR 2.03\Scripts\autotalker.scar

  2. #2
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    u dont need end else...i dont know if thats ur only error
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  3. #3
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    without end else i get [Error] (16375:4): Identifier expected

  4. #4
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    then its probbly sumwhere else in the script...send the whole thing
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  5. #5
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    SCAR Code:
    procedure offerMoney;
    begin
      if (tradeScreen = true) then
        begin
        if checkitems = true then
          begin
          if finditemname('Coins') then
            begin
            ClickItemName('Coins', false);
            wait(30+random(30));
            Popup('X');
            wait(30+random(30));
            typesend(price);
            Wait(30+random(30));
          end;
        end;
      end;
    end;

    begin
      if (finditemname('Coins') = false) then
        begin
        decline;
           case random(5) of

              1: typesend('sorry, not enough cash');

              2: typesend('Whoops, no money');

              3: typesend('nvm my friend has one for me');

              4: typesend('whoops wrong person');

              5: typesend('nvm ill just get one myself');
        end;
    end;

    begin
      if checkitems = true then
      begin
      decline;
      case random(5) of
         
      1: typesend('dont need that');
         
      2: typesend('No i need a'+item);
         
      3: typesend('nub i need a'+item);
         
      4: typesend('i need a'+item+' nub');
      end;
    end;

    thats the whole procedure

  6. #6
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    are checkitems and tradescreen vars?
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  7. #7
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    no checkitems is a function i made (not perfected yet) and tradescreen is similair to bankscreen(if tradescreen = true then)

  8. #8
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    come on somebody please help with this

  9. #9
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You needed an extra end; try this:

    SCAR Code:
    begin
      if (not(FindItemName('Coins')) then
      begin
        Decline;
        case Random(5) of
          1: TypeSend('sorry, not enough cash');
          2: TypeSend('Whoops, no money');
          3: TypeSend('nvm my friend has one for me');
          4: TypeSend('whoops wrong person');
          5: TypeSend('nvm ill just get one myself');
        end;
      end;
    end;

  10. #10
    Join Date
    Apr 2007
    Location
    Finland
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by NinjaTerrorist View Post
    You needed an extra end; try this:

    SCAR Code:
    begin
      if (not(FindItemName('Coins')) then
      begin
        Decline;
        case Random(5) of
          1: TypeSend('sorry, not enough cash');
          2: TypeSend('Whoops, no money');
          3: TypeSend('nvm my friend has one for me');
          4: TypeSend('whoops wrong person');
          5: TypeSend('nvm ill just get one myself');
        end;
      end;
    end;
    Yes, that's what I was going to say . U need a "end;" when a Case ends, so think Case as a begin too.

  11. #11
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    thanks alot! lol i dont remember that being in tutorials

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
  •