Page 1 of 2 12 LastLast
Results 1 to 25 of 26

Thread: if your right, your a genious

  1. #1
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default if your right, your a genious

    Ok this is my problem. I asked a dev and they didnt know what was wrong, so if you get it right, you should be a dev!

    i had this error yesterday, but i thought the new scar and updated srl would fix it, and it seemed to because my script ran for 5 hours no problemo.

    error:

    Code:
    [Runtime Error] : Exception: Access violation at address 006B3941 in module 'scar.exe'. Read of address 00000040 in line 369 in script C:\Program Files (x86)\SCAR 3.21\includes\SRL\SRL\Core\AntiRandoms\AntiRandoms.scar
    location:
    line 369 in antirandoms.scar in the function findlamp
    Code:
    if (FindTransparentBitmapTolerance(Lamp, x, y, clBlack, MIX1, MIY1, MIX2, MIY2, 40)) then
    attached is the script i am using.

  2. #2
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Only thing I can think of is that the bitmap might not be loaded.

  3. #3
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by D1zl3 View Post
    Ok this is my problem. I asked a dev and they didnt know what was wrong, so if you get it right, you should be a dev!

    i had this error yesterday, but i thought the new scar and updated srl would fix it, and it seemed to because my script ran for 5 hours no problemo.

    error:

    Code:
    [Runtime Error] : Exception: Access violation at address 006B3941 in module 'scar.exe'. Read of address 00000040 in line 369 in script C:\Program Files (x86)\SCAR 3.21\includes\SRL\SRL\Core\AntiRandoms\AntiRandoms.scar
    location:
    line 369 in antirandoms.scar in the function findlamp
    Code:
    if (FindTransparentBitmapTolerance(Lamp, x, y, clBlack, MIX1, MIY1, MIX2, MIY2, 40)) then
    attached is the script i am using.
    clBlack is a colour, not a bitmap, silly goose.
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  4. #4
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by noidea View Post
    clBlack is a colour, not a bitmap, silly goose.
    so the antirandoms.scar is wrong?

  5. #5
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    oops :<
    I'm the silly goose. I didn't read
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  6. #6
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by noidea View Post
    oops :<
    I'm the silly goose. I didn't read
    haha no problem

  7. #7
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by noidea View Post
    clBlack is a colour, not a bitmap, silly goose.
    Incorrect.

    FindTransparentBitmapTolerance(Lamp, x, y, clBlack, MIX1, MIY1, MIX2, MIY2, 40)

    Lamp IS the Bitmap
    clBlack is the Transparent Color (TranspCol)


    It does sound like the Bitmap wasn't loaded though... not positive, that error is pretty vague and pops up in various situations.
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  8. #8
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Narcle View Post
    Incorrect.

    FindTransparentBitmapTolerance(Lamp, x, y, clBlack, MIX1, MIY1, MIX2, MIY2, 40)

    Lamp IS the Bitmap
    clBlack is the Transparent Color (TranspCol)


    It does sound like the Bitmap wasn't loaded though... not positive, that error is pretty vague and pops up in various situations.
    if it helps: when i remove findnormalrandoms, the error never happens, and the more i put fnr in my script, the sooner it happens. 1 fnr = 30 mins without error, 2 fnr= 1 minute without errors

  9. #9
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Seems like Antirandoms.scar might need to be edited to check if it is loaded or not, and if it isn't, load it.

  10. #10
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Da 0wner View Post
    Seems like Antirandoms.scar might need to be edited to check if it is loaded or not, and if it isn't, load it.
    k... ive been away for awhile, do i just do srl_LoadBitmaps?

  11. #11
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Quote Originally Posted by D1zl3 View Post
    k... ive been away for awhile, do i just do srl_LoadBitmaps?
    It's not an error that you, as the scripter, should have to worry about, as it's an error within the SRL include itself. There is SOMETHING wrong with the FindLamp function.

  12. #12
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I do not know where the bitmap is loaded, but you should be able to load it via that (just put it above the line you get the error). Check in bitmap.scar for some other procedures you may be able to use.

  13. #13
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    k i need the lamp id if anyone has it.

    @senrath - so have you gotten this error too? if not, why?

  14. #14
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try using a

    SCAR Code:
    try
      TransparentShit;
    except
      SomeOtherShit;
    finally

    at least switch players or something so it doesn't crash the script.

  15. #15
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Quote Originally Posted by D1zl3 View Post
    k i need the lamp id if anyone has it.

    @senrath - so have you gotten this error too? if not, why?
    I haven't, but there was someone else complaining about this happening in the last couple of days.

  16. #16
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by senrath View Post
    I haven't, but there was someone else complaining about this happening in the last couple of days.
    that might have been me too

  17. #17
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    try
      Whatever
    except exit;
    Will not error or crash script.

    So try using this
    SCAR Code:
    try
      FindNormalRandoms
    except
      exit;
    Last edited by Da 0wner; 07-24-2009 at 08:42 AM.

  18. #18
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  19. #19
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Quote Originally Posted by D1zl3 View Post
    that might have been me too
    Oh. Whoops.

    Well, I'm currently running a script consisting of pretty much just FindNormalRandoms to see if I can get that error myself.

  20. #20
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by senrath View Post
    Oh. Whoops.

    Well, I'm currently running a script consisting of pretty much just FindNormalRandoms to see if I can get that error myself.
    i attached my script u can try that out

    edit: adding that try except seems to have worked

  21. #21
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think that exits the procedure that it is called in so I do not believe that is a good idea. You should probably edit FindNormalRandoms itself.

    SCAR Code:
    program New;

    procedure Blah;
    var
      b, x, y : integer;
    begin
      try
        FindTransparentBitmapTolerance(b, x, y, 0, 0, 0, 1, 1, 1)
      except end;
      Writeln('Still going :o');
    end;

    begin
      Blah;
    end.

    That above code is for editing procedure itself.
    Last edited by Da 0wner; 07-24-2009 at 09:04 AM.

  22. #22
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Quote Originally Posted by Da 0wner View Post
    I think that exits the procedure that it is called in so I do not believe that is a good idea. You should probably edit FindNormalRandoms itself.
    Or he could change it from:
    SCAR Code:
    try
      FindNormalRandoms
    except
      exit;
    to
    SCAR Code:
    try
      FindNormalRandoms;
    except end;

  23. #23
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, that's my edit .

    Edit: Hmm, that seems to not work either Senrath.

    So it seems you have to edit the actual procedure.

    SCAR Code:
    program New;

    procedure Blah;
    var
      b, x, y : integer;
    begin
        FindTransparentBitmapTolerance(b, x, y, 0, 0, 0, 1, 1, 1)
        Writeln('Still going :o'); // note how this does not show
    end;

    begin
      try
        Blah;
      except end;
    end.
    Last edited by Da 0wner; 07-24-2009 at 09:06 AM.

  24. #24
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  25. #25
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Quote Originally Posted by Da 0wner View Post
    Yeah, that's my edit .

    Edit: Hmm, that seems to not work either Senrath.

    So it seems you have to edit the actual procedure.
    What doesn't work about it?

Page 1 of 2 12 LastLast

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
  •