Results 1 to 5 of 5

Thread: FreeDTM error

  1. #1
    Join Date
    Jan 2012
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default FreeDTM error

    I have this error with freeing my DTMS and I do not know how to fix it:

    Simba Code:
    (*********************************************************************
    function LoadDTMS;
    description: Loads the DTM of the selected log
    author: Injustice
    *********************************************************************)


    function LoadDTMS : Integer;
    var
      LogDTM : Integer;
    begin
      case LowerCase(LogType) of

        'normal':
          LogDTM:= DTMFromString('mggAAAHicY2NgYHBiYmBwBGJfIPYGYjsgNgPiJ0C520D8AIjfAPFHKDvARhlIMmLB2AE2lQjVAOGOB7g=');

        'oak':
          LogDTM:= DTMFromString('mggAAAHicY2NgYMhkYmAoAOJqIM4B4lggTgXix0C5m0D8AojfA/EbIL4DxK0pVkCSEQvGDrCpRKgGAHLDCR4=');

        'willow':
          LogDTM:= DTMFromString('mlwAAAHicY2dgYHBgYmDwBuJAKG0DxMZAbAXET4DyN4D4KRC/AeKPUPYdILa3EAaSjDgwboBLB5IuANF1CLw=');

        'maple':
          LogDTM:= DTMFromString('mggAAAHicY2NgYHBmYmDwAWJPILYGYjMgdgDix0C5m0D8Fog/AvF9IL4DxJFW3ECSEQvGDrCpRKgGANgUB5o=');

        'yew':
          LogDTM:= DTMFromString('mggAAAHicY2NgYHBhYmDwBGJfIHYHYksgNgPiR0C5GwwQ+i0Qvwfih0DsacoJJBmxYOwAm0qEagDVQQeO');


      end;
    end;




    (***********************************************************************
    procedure FreeTheDTMs;
    description: Frees the DTM of log chosen
    ***********************************************************************)


    procedure FreeTheDTMS;
    begin
      FreeDTM(LogDTM); //Line 650
    end;

    The error:
    Simba Code:
    [Error] (651:11): Unknown identifier 'LogDTM' at line 650
    Compiling failed.

    Any help?

  2. #2
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Your loading function doesn't return anything, so you need to do LogDTM := LoadDTMS;

    And have LogDTM as a global variable.
    There used to be something meaningful here.

  3. #3
    Join Date
    Jan 2012
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Frement View Post
    Your loading function doesn't return anything, so you need to do LogDTM := LoadDTMS;

    And have LogDTM as a global variable.
    So I've changed it to this:

    Simba Code:
    function LoadDTMS : Integer;
    begin
      case LowerCase(LogType) of

        'normal': then //Line 610
          LogDTM:= DTMFromString('mggAAAHicY2NgYHBiYmBwBGJfIPYGYjsgNgPiJ0C520D8AIjfAPFHKDvARhlIMmLB2AE2lQjVAOGOB7g=');

        'oak': then
          LogDTM:= DTMFromString('mggAAAHicY2NgYMhkYmAoAOJqIM4B4lggTgXix0C5m0D8AojfA/EbIL4DxK0pVkCSEQvGDrCpRKgGAHLDCR4=');

        'willow': then
          LogDTM:= DTMFromString('mlwAAAHicY2dgYHBgYmDwBuJAKG0DxMZAbAXET4DyN4D4KRC/AeKPUPYdILa3EAaSjDgwboBLB5IuANF1CLw=');

        'maple': then
          LogDTM:= DTMFromString('mggAAAHicY2NgYHBmYmDwAWJPILYGYjMgdgDix0C5m0D8Fog/AvF9IL4DxJFW3ECSEQvGDrCpRKgGANgUB5o=');

        'yew': then
          LogDTM:= DTMFromString('mggAAAHicY2NgYHBhYmDwBGJfIHYHYksgNgPiR0C5GwwQ+i0Qvwfih0DsacoJJBmxYOwAm0qEagDVQQeO');

        'magic': then
          LogDTM:= DTMFromString('');


      end;
    end;

    And now this is the error:

    Simba Code:
    [Error] (611:15): Identifier expected at line 610
    Compiling failed.

  4. #4
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Why did you add the "then" after each case?
    There used to be something meaningful here.

  5. #5
    Join Date
    Jan 2012
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Frement View Post
    Why did you add the "then" after each case?
    Oh yeah, just realised that. I was experimenting if it would work with an if...then statement :/

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
  •