Results 1 to 9 of 9

Thread: Im getting crazzzzy!!!

  1. #1
    Join Date
    Jun 2007
    Location
    Mianus
    Posts
    863
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Im getting crazzzzy!!!

    Ok.. so me and Hugo talked for like 20 mins ago, he told me a nice idea to do, this was a FM script, so i started making DTMs to make it be good then i get errors when i try to complie plz help me

    SCAR Code:
    program ShortBurner;
    {.include SRL\SRL.scar}

    Var
    NormalLog, OakLog,WillowLog,MapleLog,YewLog,MagicLog : Integer;

    Const

    NormalLog = False;
    OakLog = False;
    WillowLog =True;
    MapleLog =False;
    YewLog =False;
    MagicLog =False;






    Procedure LoadDTMs;
    begin
    NormalLog := DTMFromString('78DA63E4636060E06540010DC9D60CFF81342' +
           '30CCB0209165435AE36C6609A11CA6704C9B3115003B28B19558D' +
           '879D29AA1A2620218EAAC6DBC90A550DC83D1204EC12C05403938' +
           '5AB91061202A82A6A13AD30DD2388AAA63A5C1E450D003D5E08E4' +
           '');

    OakLog := DTMFromString('78DA63E4636060E06640017D794E0CFF81342' +
           '30C4B0309165435060A0A609A11CA676406126CA86A3CEC4C51D5' +
           '80EC624255E3ED6485698E28AA1A4F3B0B54355240420C4D8D039' +
           'A5DBC986A40FE425103F2171FAA9ACE2C7B143500389C0913');

    WillowLog := DTMFromString('78DA63E4656060E0674001DE2ED20CFF81342' +
           '3103381681920C18AAAC6D94A0F4C3342F98C2C40829D010D30A2' +
           'AA01D9C586AA22C04316550DC842315435AE36C6A86AA48184040' +
           '135203F8913700FC85F02987E47560300F69D0628');

    MapleLog := DTMFromString('78DA6314626060E0634001B95EBC0CFF81342' +
           '3103381682520C18CAAC6D3C1144C3342F98CCC986A3CECD0D480' +
           '08095435CE567AA86A40764911B04B10D39C425F3E54358A40821' +
           'F554DB41D37A69BF9F1DB0500F07107F0');

    YewLog := DTMFromString('78DA63E4616060E063400141765C0CFF81342' +
           '3103381685920C182AAC6D5C6184C3342F98C4C44A80199238EAA' +
           'C6DBC90A550D2BA61A4F075354355240821F554D82070FA67BD0F' +
           'C156ECA8DA20600AD3E06AC');

    MagicLog := DTMFromString('78DA6314606060E06340017969F60CFF81342' +
           '30C2B0009565435DE4E56609A11CA6704319888502386AAC6D5C6' +
           '18558D22909020600E3390104055535B84A64606D35FD525C1A86' +
           'AF8818424AA1A03050554352033D850D57435C5A2A80100E4B70A' +
           '82');
           
    TinderBox := DTMFromString('78DA63E4676060106040014B67CE64F80FA41' +
           '981980944CB0209665435DE4E56609A11CA6704C9B3A1AAF1B033' +
           '45550362481130471248C8A0AAF174403387054808A2AA59367B1' +
           '6AA1A69202184AAA6343717550DC80C56543559C949A86A7831DD' +
           '3C7FCA1414350052B30D29');
    end;

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

        Players[0].Name     := 'Username';            //Name
        Players[0].Pass     := 'Pass';            //Password
        Players[0].Active   := True;
        Players[0].Nick     := 'Nick';
    end;


    Procedure BurnLogs;
    var X, Y,NormalLog : Integer;
    Begin
    if(NormalLog = True)then
    begin
    if(FindDTM(Normal, x, y, 100, 100, 500, 300)) then
    Mouse(X, Y, 0, 0, True);
    if(FindDTM(TinderBox, x, y, 100, 100, 500, 300)) then
    Mouse(X, Y, 0, 0, True);
    Writeln ('We Just Burned 1 Normal Log!');
    FreeDTM(NormalLog);


    end;
    end;

    begin
    SetUpSRL;
    LoadDTMs;
    DeclarePlayers;
    if(not(LoggedIn))then
    LogInPlayer;
    BurnLogs;


    end.

    The Error:

    Line 9: [Error] (15999:1): Duplicate identifier '' in script

    that 'line' is:

    Const
    NormalLog = False;
    OakLog = False;
    WillowLog =True;
    MapleLog =False;
    YewLog =False;
    MagicLog =False;

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

    Default

    Variables and Conts's have to have different names as the script wouldn't know whether to call the constant or variable in the script. Using vNormalLog and cNormalLog is a simple way to keep the names the more or less the same, but differs them so the script knows which to use.

  3. #3
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    in other words you have a var normal log, and a const normal log. Cant have both.
    I do visit every 2-6 months

  4. #4
    Join Date
    Jun 2007
    Location
    Mianus
    Posts
    863
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ow well lol, when i get home from school ill do some more work

  5. #5
    Join Date
    Jun 2007
    Location
    Mianus
    Posts
    863
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yaaay!! got it to work

    Successfully compiled
    Line 5: [Hint] (15995:1): Variable 'NORMALLOG' never used in script C:\Documents and Settings\Aram & Peyman\Skrivbord\Burner.scar
    Line 5: [Hint] (15995:1): Variable 'OAKLOG' never used in script C:\Documents and Settings\Aram & Peyman\Skrivbord\Burner.scar
    Line 5: [Hint] (15995:1): Variable 'WILLOWLOG' never used in script C:\Documents and Settings\Aram & Peyman\Skrivbord\Burner.scar
    Line 5: [Hint] (15995:1): Variable 'MAPLELOG' never used in script C:\Documents and Settings\Aram & Peyman\Skrivbord\Burner.scar
    Line 5: [Hint] (15995:1): Variable 'YEWLOG' never used in script C:\Documents and Settings\Aram & Peyman\Skrivbord\Burner.scar
    Line 5: [Hint] (15995:1): Variable 'MAGICLOG' never used in script C:\Documents and Settings\Aram & Peyman\Skrivbord\Burner.scar
    SRL Compiled in 15 msec
    Successfully executed

    just changed some stuff like Mixter said

    SCAR Code:
    program ShortBurner;
    {.include SRL\SRL.scar}

    Var
    NormalLog, OakLog,WillowLog,MapleLog,YewLog,MagicLog : Integer;

    Const
    CNormalLog = False;
    COakLog = False;
    CWillowLog =True;
    CMapleLog =False;
    CYewLog =False;
    CMagicLog =False;




    Var
    DNormalLog, DOakLog,DWillowLog,DMapleLog,DYewLog,DMagicLog,TinderBox : Integer;

    Procedure LoadDTMs;
    begin
    DNormalLog := DTMFromString('78DA63E4636060E06540010DC9D60CFF81342' +
           '30CCB0209165435AE36C6609A11CA6704C9B3115003B28B19558D' +
           '879D29AA1A2620218EAAC6DBC90A550DC83D1204EC12C05403938' +
           '5AB91061202A82A6A13AD30DD2388AAA63A5C1E450D003D5E08E4' +
           '');

    DOakLog := DTMFromString('78DA63E4636060E06640017D794E0CFF81342' +
           '30C4B0309165435060A0A609A11CA676406126CA86A3CEC4C51D5' +
           '80EC624255E3ED6485698E28AA1A4F3B0B54355240420C4D8D039' +
           'A5DBC986A40FE425103F2171FAA9ACE2C7B143500389C0913');

    DWillowLog := DTMFromString('78DA63E4656060E0674001DE2ED20CFF81342' +
           '3103381681920C18AAAC6D94A0F4C3342F98C2C40829D010D30A2' +
           'AA01D9C586AA22C04316550DC842315435AE36C6A86AA48184040' +
           '135203F8913700FC85F02987E47560300F69D0628');

    DMapleLog := DTMFromString('78DA6314626060E0634001B95EBC0CFF81342' +
           '3103381682520C18CAAC6D3C1144C3342F98CCC986A3CECD0D480' +
           '08095435CE567AA86A40764911B04B10D39C425F3E54358A40821' +
           'F554DB41D37A69BF9F1DB0500F07107F0');

    DYewLog := DTMFromString('78DA63E4616060E063400141765C0CFF81342' +
           '3103381685920C182AAC6D5C6184C3342F98C4C44A80199238EAA' +
           'C6DBC90A550D2BA61A4F075354355240821F554D82070FA67BD0F' +
           'C156ECA8DA20600AD3E06AC');

    DMagicLog := DTMFromString('78DA6314606060E06340017969F60CFF81342' +
           '30C2B0009565435DE4E56609A11CA6704319888502386AAC6D5C6' +
           '18558D22909020600E3390104055535B84A64606D35FD525C1A86' +
           'AF8818424AA1A03050554352033D850D57435C5A2A80100E4B70A' +
           '82');
           
    TinderBox := DTMFromString('78DA63E4676060106040014B67CE64F80FA41' +
           '981980944CB0209665435DE4E56609A11CA6704C9B3A1AAF1B033' +
           '45550362481130471248C8A0AAF174403387054808A2AA59367B1' +
           '6AA1A69202184AAA6343717550DC80C56543559C949A86A7831DD' +
           '3C7FCA1414350052B30D29');
    end;

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

        Players[0].Name     := 'Username';            //Name
        Players[0].Pass     := 'Pass';            //Password
        Players[0].Active   := True;
        Players[0].Nick     := 'Nick';
    end;


    Procedure BurnLogs;
    var X, Y,DNormalLog : Integer;
    Begin
    if(CNormalLog = True)then
    begin
    if(FindDTM(DNormalLog, x, y, 100, 100, 500, 300)) then
    Mouse(X, Y, 0, 0, True);
    if(FindDTM(TinderBox, x, y, 100, 100, 500, 300)) then
    Mouse(X, Y, 0, 0, True);
    Writeln ('We Just Burned 1 Normal Log!');
    FreeDTM(DNormalLog);


    end;
    end;

    begin
    SetUpSRL;
    LoadDTMs;
    DeclarePlayers;
    if(not(LoggedIn))then
    LogInPlayer;
    BurnLogs;


    end.

    Edit: those vars will be used soon

  6. #6
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    you can just have 1 DTM for every log.... il make it if u want?

  7. #7
    Join Date
    Jul 2007
    Location
    St. Louis, Missouri, USA.
    Posts
    575
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You could just use a string of the log type instead of a bunch of boolean constants. Also, just make the DTM called log or something and set it up based on a case of the log const.

    An option for a burn any type would be cool too.

    Good luck.
    -You can call me Mick-



  8. #8
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    lmao i know const make it look messy and nooby

    use string.

  9. #9
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by p1nky View Post
    lmao i know const make it look messy and nooby

    use string.
    Yeah, you could put the String into a constant like:
    SCAR Code:
    const
      LogType = 'Normal Log';
    and you can use it like:
    SCAR Code:
    procedure BurnLog;
    begin
      if(LogType='Normal Log') then
        begin
        if(FindDTM(DNormalLog, x, y, 100, 100, 500, 300)) then
          begin
            Mouse(X, Y, 0, 0, True);
            if(FindDTM(TinderBox, x, y, 100, 100, 500, 300)) then
              begin
                Mouse(X, Y, 0, 0, True);
                Writeln ('We Just Burned 1 Normal Log!');
                FreeDTM(DNormalLog);
              end;
           end;
        end;
    end;
    Simple actually
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

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
  •