Results 1 to 11 of 11

Thread: Identifier expected in script?

  1. #1
    Join Date
    Jun 2007
    Location
    Liverpool ,Nsw,Australia
    Posts
    740
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Identifier expected in script?

    Hey i havent made a script in a while and i keep getting this error

    SCAR Code:
    Identifier expected in script

    this is the procedure its in

    SCAR Code:
    procedure CastT3hSpell;
    begin
    case Random(2) of

    0: begin if (not(LoggedIn)) then Exit;
      GameTab(7)
      CastSpell(Spell2Use)
       FindObjCustom(x,y,[MonsterName1,Monstername2,MonsterName3],[MonsterColour1,MonsterColour2,MonsterColour3],15)
       Mouse(x, y, 4, 4, True);
         Antiban;
        if (FindBlackChatMessage('already been')) then
        WriteLn('Monster has already been casted on');
       MonsterCasted;
        end;
       end;

    1:begin
    begin if (not(LoggedIn)) then Exit;
      GameTab(7)
      CastSpell(Spell2Use)
       FindObjCustom(x,y,[MonsterName1,Monstername2,MonsterName3],[MonsterColour1,MonsterColour2,MonsterColour3],15)
         Mouse(x, y, 4, 4, False);
         ChooseOption('ast');
         Antiban;
        if (FindBlackChatMessage('already been')) then
        WriteLn('Monster has already been casted on'); then
        MonsterCasted;
        end;
       end;

    The line where it says MonsterCasted;. MonsterCasted is a procedure in my script that i have made i want it to go to that particularly procedure any help?

    SCAR Code:
    //
    //    _________ __         .__ __
    //    /   _____//  |________|__|  | __ ___________  ______
    //   \_____  \\   __\_  __ \  |  |/ // __ \_  __ \/  ___/
    //  /        \|  |  |  | \/  |    <\  ___/|  | \/\___ \
    // /_______  /|__|  |__|  |__|__|_ \\___  >__|  /____  >
    //  _________
    // \_   ___ \      _______  ___________ ______
    // /    \  \/|  |  \_  __ \/  ___// __ \_  __ \
    // \     \___|  |  /|  | \/\___ \\  ___/|  | \/
    // \______  /____/ |__|  /____  >\___  >__|
    //        \/                  \/     \/
    program StrikersAutoCurser;
    {.include srl/srl/misc/Smart.scar}
    {.include SRL/SRL.scar}
    {.include srl/srl/skill/magic.scar}

    var
    x, y        :Integer;
    XpGained    :integer;
    YourMageLvl :integer;
    HowManyCast :integer;
    Antibans    :Integer;
    i           :Integer;
    RuneDTM     :Integer;


    Const
    MonsterName1=0;//Part of the monsters Name
    MonsterName2=0;
    MonsterName3=0;

    MonsterColour1=0;//A colour of the monster
    MonsterColour2=0;
    MonsterColour3=0;

    SmartWorld=0;
    WhichWay='N';//Which Way to run if in a fight?
    Spell2Use=0;//Curse = ,Weaken = ,Confuse =

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := 'Username'; //username
      Players[0].Pass := 'Password'; //password
      Players[0].Nick := 'ern'; //3-4 letters from your username
      Players[0].Active := True;
    end;

    procedure GetMagicInfo;
    Begin
         if (not(LoggedIn)) then Exit;
        GameTab(2);
       Wait(1500+Random(434))
      YourMageLvl:=GetSkillInfo('Magic', false);
     Wait(4789+random(1654))
     GameTab(4);
    End;

    Procedure WriteProggie;
    Begin
    ClearDebug;
    WriteLn('|||||||||||||||||||||||||||||||||||||||||||||||||||||')
    WriteLn('|||||||||||||||||StrikersCurser||||||||||||||||||||||')
    WriteLn('Casted'+IntToStr(HowManyCast)+'Of your Selected spell')
    WriteLn('Ran For'+(timerunning)+'|||||||||||||||||||||||||||||')
    WriteLn('Magic Lvl is' +IntToStr(YourMageLvl)+ '||||||||||||||')
    WriteLn('Gained' +IntToStr(XpGained)+ '|||||||||||||||||||||||')
    WriteLn('AntiBanned' +IntToStr(Antibans)+ '|||||||||||||||||||')
    WriteLn('Thanks For using Strikers Curser|||||||||||||||||||||')
    WriteLn('Please Post Proggie on the webpage you got it from|||')
    WriteLn('|||||||||||||||||||||||||||||||||||||||||||||||||||||')
    end;

    procedure Antiban;
    begin
      if not LoggedIn then Exit;
      case Random(68) of
        0:
          begin
            HoverSkill('Magic', False);
            Antibans:=Antibans+1;
          end;
        1:
          begin
            HoverSkill('Random', false);
            Antibans:=Antibans+1;
          end;
        2:
          begin
            GameTab(1 + Random(12));
            wait(800 + random(500));
            GameTab(4);
            Antibans:=Antibans+1;
          end;
        3:
          begin
            BoredHuman;
            Antibans:=Antibans+1;
          end;
        4:
          begin
            AlmostLogout;
            Antibans:=Antibans+1;
          end;
        5:
          begin
            DoEmote(400 + Random(90));
            Antibans:=Antibans+1;
          end;
      end;
    end;


    Procedure AntiRandoms;
    var
    i : Integer;
    Begin
      Status('Doing AntiRandoms');
        for i := 0 to 3 do
          FindNormalRandoms;
          FindFight;
          FindNonInventoryRandoms;
          wait(1000+ Random (543));
    end;

    Procedure FindRandomFight;
    Begin
    If(FindFight) then
      Begin
        Status('Our Guys Getting Attacked');
        Writeln('Jesus Crist He is dying')
        Writeln('Dude run')
        Begin
          Status('Running Away From Th3 D0oD');
          Writeln('Dont Stop Now...');
          RunAway(WhichWay,False,1,8000+Random(3000))
          Writeln('Haha yeah thats right you better run');
        end;
      end;
    end;

    Procedure CheckIfWeHaveRunes;
    Begin
          if not LoggedIn then Exit;
         GameTab(4)
        Wait(340 +Random(765))
       if (FindDTM(RuneDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
      WriteLn('Yay We Have Runes');
     FreeDTM(RuneDTM);
    end;

    Procedure LoadDTMS;
    Begin
    RuneDTM := DTMFromString('78DA634C656060886240013D4D4D609A11CA6' +
           '74C0612DE0C688011554D319088405561A0A080694E1CAA9A5C6F' +
           '3E5435E940228D805D61986EC650130E248209A8C9071289986AF' +
           'E23ABC920EC7700B1510A81');
    End;

    Procedure ScarDisguise;//Made by me....Idea off Cursed YOU who got it off Hy :P
    begin
     Case Random(13) of
     0: Disguise('Xfire');
     1: Disguise('Youtube - Broadcast Yourself. - Mozilla Firefox');
     2: Disguise('Youporn.com Lite (BETA) - Free Porn - Mozilla Firefox');{-----LOL}
     3: Disguise('Mozilla Firefox Start Page - Mozilla Firefox');
     4: Disguise('RuneScape - the massive online adventure game by Jagex Ltd - Mozilla Firefox');
     5: Disguise('DVD Decrypter');
     6: Disguise('Windows Media Player');
     7: Disguise('Document1 - Microsoft Word');
     8: Disguise('Symantec AntiVirus');
     9: Disguise('The Microsoft Hearts Network');
     10: Disguise('Sythe.Org Forums - Powered by vBulletin');
     11: Disguise('Tip.it Runescape Help :: The Original Runescape Help Site!');
     12: Disguise('EA games <EAGames> - Mozilla Firefox');
    {13: Disguise('Ima Cheater Ban Me Pl0x'}
      end;
     end;
     
    procedure CastT3hSpell;
    begin
    case Random(2) of

    0: begin if (not(LoggedIn)) then Exit;
      GameTab(7)
      CastSpell(Spell2Use)
       FindObjCustom(x,y,[MonsterName1,Monstername2,MonsterName3],[MonsterColour1,MonsterColour2,MonsterColour3],15)
       Mouse(x, y, 4, 4, True);
         Antiban;
        if (FindBlackChatMessage('already been')) then
        WriteLn('Monster has already been casted on');
       MonsterCasted;
        end;
       end;

    1:begin
    begin if (not(LoggedIn)) then Exit;
      GameTab(7)
      CastSpell(Spell2Use)
       FindObjCustom(x,y,[MonsterName1,Monstername2,MonsterName3],[MonsterColour1,MonsterColour2,MonsterColour3],15)
         Mouse(x, y, 4, 4, False);
         ChooseOption('ast');
         Antiban;
        if (FindBlackChatMessage('already been')) then
        WriteLn('Monster has already been casted on'); then
        MonsterCasted;
        end;
       end;



    procedure RandomSayings;
    begin
    case Random(350) of
    0:Typesend('Grr stupid monster')
    1:Typesend('Almost got a mage lvl')
    2:Typesend('Gosh msgic is boring')then
    Typesend('Magic*')
    3:Typesend('Ladedada')

    end

    procedure MonsterCasted;
    begin
     Wait(576+ random(432))
      Antiban;
       Antiban;
       wait(3453+ Random(6522))
        CastT3hSpell;
       end




    Procedure Siggy;
    Begin
    WriteLn('_____ _       _ _                  _____     _')
    Wait(500)
    WriteLn('|   __| |_ ___|_| |_ ___ ___ ___   |  _  |_ _| |_ ___ ')
    Wait(500)
    WriteLn('|__   |  _|  _| | _| -_|  _|_ -|  |     | | |  _| . |')
    Wait(500)
    WriteLn('|_____|_| |_| |_|_,_|___|_| |___|  |__|__|___|_| |___|')
    Wait(500)
    WriteLn(' _____ ')
    Wait(500)
    WriteLn('|     |_ _ ___ ___ ___ ___')
    Wait(500)
    WriteLn('|   --| | |  _|_ -| -_|  _|')
    Wait(500)
    WriteLn('|_____|___|_| |___|___|_|')
    Wait(500)
    WriteLn('Made With SCAR Version 3.15b')
    Wait(500)
    WriteLn('With SRL Rev 16')
    Wait(500)
    WriteLn('Dont Post anywhere without my concent')
    Wait(500)
    WriteLn('Made By Strikerx25')
    Wait(500)
    WriteLn('Enjoy!')
    Wait(500)
    WriteLn('Waiting For SMART to Start')
    end;

    Procedure SetUpCharacter;
    begin
             Siggy;
            SetUpSRL
           SmartSetupex(SmartWorld, False, True);
           While Not (SmartReady) Do
         Wait(100);
        SetTargetDC(SmartGetDC);
       If Not (LoggedIn) Then
      While Not (SmartGetColor(386, 249) = 65535) Do
     Wait(100);

          ScarDisguise;
         ActivateClient
        LoginPlayer;
       SetRun(True)
      SetAngle(True)
     CheckIfWeHaveRunes;
    end;

    Procedure MainLoop;
    begin





    begin

    end.
    Quote Originally Posted by Darkmage View Post
    I got 2 questions'
    #1. When i run the script will it automatically pick up the mouse and move?

  2. #2
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Count the number of begins and ends you have.

  3. #3
    Join Date
    Jun 2007
    Location
    Liverpool ,Nsw,Australia
    Posts
    740
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol duh *slaps Himself on the head* now i get this which was to original problem

    Unknown identifier 'MonsterCasted' in script
    Quote Originally Posted by Darkmage View Post
    I got 2 questions'
    #1. When i run the script will it automatically pick up the mouse and move?

  4. #4
    Join Date
    Apr 2007
    Posts
    994
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    procedure CastT3hSpell;
    begin
      case Random(2) of
      0: begin
           if (not(LoggedIn)) then Exit;
           GameTab(7)
           CastSpell(Spell2Use)
           FindObjCustom(x,y,[MonsterName1,Monstername2,MonsterName3],[MonsterColour1,MonsterColour2,MonsterColour3],15)
           Mouse(x, y, 4, 4, True);
           Antiban;
           if (FindBlackChatMessage('already been')) then
             WriteLn('Monster has already been casted on');
           writeln('Monster casted');
    //MonsterCasted;
         end;

      1:begin
         if (not(LoggedIn)) then Exit;
           GameTab(7)
           CastSpell(Spell2Use)
           FindObjCustom(x,y,[MonsterName1,Monstername2,MonsterName3],[MonsterColour1,MonsterColour2,MonsterColour3],15)
           Mouse(x, y, 4, 4, False);
           ChooseOption('ast');
           Antiban;
           if (FindBlackChatMessage('already been')) then
             WriteLn('Monster has already been casted on');
           writeln('Monster casted');
          //MonsterCasted;
          end;
        end;
    end;

    You had an extra end; at your 0, and a extra begin at the 1. Cases needs a end too. Your procedure after casttehspell, random speech or something is missing a lot of semicolons. Add them, and probably add them in this procedure too.

    Standards as the best thing since sliced bread and hot butter. And teh pr0nz.

    SO USE THEM!

    Jad has a excellent shortcut for standards, cannot find them though. But use standards. Naw. I fixed the above procedure for you.

    EDIT: Monster casted is an undefined whatevermjicallit because it is behind this procedure. Either bring MonsterCasted foward, or bring this one back, or foward the Monstercasted.


    Standards. Naw.
    [QUOTE]<GoF`> oh no its Raymooond
    <Raymooond> Heya
    <GoF`> is it ray or some other ray?
    <LeeLokHin> No idea
    <LeeLokHin> Raymond, what's the game you like the most?
    <Raymooond> Runescape
    <-- LeeLokHin has kicked Raymooond from #srl (Faker.)[/QUOTE]

  5. #5
    Join Date
    Jun 2007
    Location
    Liverpool ,Nsw,Australia
    Posts
    740
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks rep'ed both and i like getting my script done before making it nice
    Quote Originally Posted by Darkmage View Post
    I got 2 questions'
    #1. When i run the script will it automatically pick up the mouse and move?

  6. #6
    Join Date
    Oct 2006
    Posts
    1,190
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    either have the monster casted function above castthespell; or u can use the forward function =]

    EDIT: haha leelokhin beat me to it i started watch tv as i was posting =]=]



  7. #7
    Join Date
    Apr 2007
    Posts
    994
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh and, if you want the standards tutorial I was talking about, here it is. Scroll down a bit.

    http://www.villavu.com/forum/showthread.php?t=9377
    [QUOTE]<GoF`> oh no its Raymooond
    <Raymooond> Heya
    <GoF`> is it ray or some other ray?
    <LeeLokHin> No idea
    <LeeLokHin> Raymond, what's the game you like the most?
    <Raymooond> Runescape
    <-- LeeLokHin has kicked Raymooond from #srl (Faker.)[/QUOTE]

  8. #8
    Join Date
    Apr 2008
    Location
    Northwest england
    Posts
    1,179
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    bonfield if that was the problem then the error would have been unknown identifier

    also when writing scripts do standards as you write it it makes it easier for you to understand and spot error/improve/debug etc if its all on against the side then it gets confusing

    ..............................................ther e is no space here\/ its just a bit special =Þ
    notusingscriptingstandardsislikenothavingaspacebar itmakesitverydifficulttounderstandandeithenmoredif ficulttospotspeillingmistakes


    wow it was hard not to use space bar =]
    Blank!

  9. #9
    Join Date
    Jun 2007
    Location
    Liverpool ,Nsw,Australia
    Posts
    740
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks
    Quote Originally Posted by Darkmage View Post
    I got 2 questions'
    #1. When i run the script will it automatically pick up the mouse and move?

  10. #10
    Join Date
    Oct 2006
    Posts
    1,190
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by waddo View Post
    bonfield if that was the problem then the error would have been unknown identifier

    also when writing scripts do standards as you write it it makes it easier for you to understand and spot error/improve/debug etc if its all on against the side then it gets confusing

    notusingscriptingstandardsislikenothavingaspacebar itmakesitverydifficulttounderstandandeithenmoredif ficulttospotspeillingmistakes

    there is no space here^ its just a bit special =Þ
    ow it was hard not to use space bar =]
    it was seeing as zeph fixed the identifier problem, its in the post below it



  11. #11
    Join Date
    Apr 2008
    Location
    Northwest england
    Posts
    1,179
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    oh yes sorry i did read the posts i just automatically read it as identifier expected as that as the original problem

    slily biarn bineg albe to do sutff like tihs
    Blank!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Identifier expected in script...But Why?
    By Macrosoft in forum OSR Help
    Replies: 10
    Last Post: 01-27-2012, 06:33 AM
  2. Bah!! Identifier Expected in Script.
    By siroober in forum OSR Help
    Replies: 3
    Last Post: 05-03-2008, 11:46 PM
  3. Identifier expected in script
    By StrikerX in forum OSR Help
    Replies: 2
    Last Post: 04-11-2008, 12:21 PM
  4. Identifier expected in script
    By Becks in forum OSR Help
    Replies: 6
    Last Post: 04-11-2008, 06:41 AM
  5. Identifier expected in script?
    By steth1010 in forum OSR Help
    Replies: 6
    Last Post: 05-06-2007, 09:03 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
  •