Results 1 to 5 of 5

Thread: ByRef argument type mismatch, what is wrong with this little piece of code

  1. #1
    bzemer
    Guest

    Unhappy ByRef argument type mismatch, what is wrong with this little piece of code

    Hi,
    i can't figure out why i get this error..
    All seems fine, i used this code before..
    well here it is:

    Code:
    Dim Inum As Integer
    Nget IniLine, "Num", Inum 'i'll explain this down
    i use this function to get stuff out of my ini file..
    it suppose to get 'Num' from IniLine.
    'Num' in the ini file is '6'.
    Normaly i would get that Inum = 6, but instead i get a ByRef error..

    in the previus line i used the same code:

    Code:
    Dim Iname As String
    Nget IniLine, "Name", Iname
    and i got the value of Iname with no trubble..

    why is that..??
    anyone?
    thanks...

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    How are you storing 6 in your file?
    integer or string...
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3
    Addicted Member stevess's Avatar
    Join Date
    May 2001
    Posts
    251
    The items stored in the INI file are always strings. Either use val or use an API call such as GetIniInt

  4. #4
    bzemer
    Guest

    Thumbs up mmmm...

    I thought it was integer but you were correct...
    It was string and it's working now... i didn't encouter this anywhere before...

    thanks..!!

  5. #5
    Addicted Member stevess's Avatar
    Join Date
    May 2001
    Posts
    251
    oops...

    GetIniInt is from one of our proprietary dlls

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width