Results 1 to 14 of 14

Thread: A Runtime Error that's driving me nuts

  1. #1
    Join Date
    Mar 2008
    Location
    In a cave
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default A Runtime Error that's driving me nuts

    This is a ScriptTerminate procedure I have in my script:
    Code:
    procedure ScriptTerminate;
    begin
      FreeStaticDTMs;
      if DDTM <> 0 then FreeDTM(DDTM);
      Proggy(True);
    end;
    Every each time I call it/terminate the script the line 'if DDTM <> 0 then FreeDTM(DDTM); gives me a runtimer...
    A Chinese wiseman once said: "Shu ciu!", it was considered very smart, but now people know it means: "Something stinks here!"
    FalBuggySmelter v.1.31
    [Updated on the 1st of March 2010]
    RimmBugger BETA V1.8

  2. #2
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    SCAR Code:
    if DDTM <> '' then FreeDTM(DDTM);
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  3. #3
    Join Date
    Mar 2008
    Location
    In a cave
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh, I see, if I free a DTM it doesn't set it to 0, it just deletes its value, am I correct?

    EDIT: Was a good guess, but unfortunately didn't help much...
    Last edited by bugger0001; 07-01-2009 at 03:21 PM.
    A Chinese wiseman once said: "Shu ciu!", it was considered very smart, but now people know it means: "Something stinks here!"
    FalBuggySmelter v.1.31
    [Updated on the 1st of March 2010]
    RimmBugger BETA V1.8

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

    Default

    Setting a dtm doesn't change the variables value, I believe it remains as zero. R1ch's method wouldn't work either because DTMs are stored in Integer variables.

    Best way would be to either assume the DTM is already assigned or to put try except statements around the freeing.

  5. #5
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by ZephyrsFury View Post
    Setting a dtm doesn't change the variables value, I believe it remains as zero. R1ch's method wouldn't work either because DTMs are stored in Integer variables.

    Best way would be to either assume the DTM is already assigned or to put try except statements around the freeing.
    If it's a variable cant you just use the nil command?

  6. #6
    Join Date
    Mar 2008
    Location
    In a cave
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, just tested it and if I set a DTM the variable remains zero. I'm not much into Try Excepts yet, but I guess it's a necessity now

    Quote Originally Posted by NaumanAkhlaQ View Post
    If it's a variable cant you just use the nil command?
    Type mismatch :S

    EDIT: Lol just got a freakish idea. Why not make a Global Boolean for all my static DTMs and another one for my DDTM. Then I could change it's value to true if it's set and false if I've already freed it :P

    EDIT2: Now realised that that's what Zeph basically suggested
    Last edited by bugger0001; 07-01-2009 at 03:26 PM.
    A Chinese wiseman once said: "Shu ciu!", it was considered very smart, but now people know it means: "Something stinks here!"
    FalBuggySmelter v.1.31
    [Updated on the 1st of March 2010]
    RimmBugger BETA V1.8

  7. #7
    Join Date
    Oct 2008
    Location
    behind you!
    Posts
    1,688
    Mentioned
    2 Post(s)
    Quoted
    40 Post(s)

    Default

    DDTM is fail, try something else, like TPA walking .
    Hi

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

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    If it's a variable cant you just use the nil command?
    I've never tried it. Does it work?

  9. #9
    Join Date
    Mar 2008
    Location
    In a cave
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Tickyy View Post
    DDTM is fail, try something else, like TPA walking .
    I can't agree with you. RimmBugger's walking from Fally to Rimmington mine uses DDTMs and it's pretty much flawless.

    Quote Originally Posted by ZephyrsFury View Post
    I've never tried it. Does it work?
    No it doesn't. At least I got a Type mismatch error
    Last edited by bugger0001; 07-01-2009 at 03:38 PM.
    A Chinese wiseman once said: "Shu ciu!", it was considered very smart, but now people know it means: "Something stinks here!"
    FalBuggySmelter v.1.31
    [Updated on the 1st of March 2010]
    RimmBugger BETA V1.8

  10. #10
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ...
    Quote Originally Posted by ZephyrsFury View Post
    I've never tried it. Does it work?
    Quote Originally Posted by bugger0001 View Post
    Yeah, just tested it and if I set a DTM the variable remains zero. I'm not much into Try Excepts yet, but I guess it's a necessity now



    Type mismatch :S

    EDIT: Lol just got a freakish idea. Why not make a Global Boolean for all my static DTMs and another one for my DDTM. Then I could change it's value to true if it's set and false if I've already freed it :P

    EDIT2: Now realised that that's what Zeph basically suggested

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

    Default

    Quote Originally Posted by 99_ aka ian. View Post
    ...
    wat?

  12. #12
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    He said it didn't.

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

    Default

    Quote Originally Posted by 99_ aka ian. View Post
    He said it didn't.
    So I must have forgotten to refresh the page.

  14. #14
    Join Date
    Mar 2008
    Location
    In a cave
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hehe, the quote 99 posted wasn't about the nil stuff. But I replied to the nil part in the post just before 99's by editing it during 99's posting
    A Chinese wiseman once said: "Shu ciu!", it was considered very smart, but now people know it means: "Something stinks here!"
    FalBuggySmelter v.1.31
    [Updated on the 1st of March 2010]
    RimmBugger BETA V1.8

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
  •