Results 1 to 9 of 9
  1. #1
    ecaep42's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Posts
    123
    Reputation
    10
    Thanks
    11
    My Mood
    Relaxed

    Conversion From 'String' " " To Type 'Double' Not Valid

    I am making a program that downloads programs to %appdata% folder, i was able to get to the folder, i have downloading done, but when i debug and test, i get this error! It is 100% correct but it isnt working (using imports system.environment, and it worked before).

    The code i use was "dim launch as string = getfolderpath(specialfolder.applicationdata + "program.exe" with "file.exists". I googled it but no avail . Please help!

    Ps using the mobile version.
    HOW TO GET A ADMIN/MODS ATTENTION:
    1) Find a reason to get their attention.
    2) Post a outside link to a broken file (Such as Med-ia Fire, Mega, and even youtube (Since they hate outside links so much)).
    3) Yell and call other people ******s
    4) Become a closet homosexual
    5) Watch as the mods try to ban you, but cant because its a fake url and they fell for your trick.
    6) Report them to a higher-admin.
    7) Watch them get demoted and banned

    ᕙ( ͡° ͜ʖ ͡°)ᕗ OBEY MY DOG ᕙ( ͡° ͜ʖ ͡°)ᕗ


    [url]https://www.youtube.com/watch?v=7cw2DllsZmc]https://www.youtube.com/watch?v=7cw2DllsZmc[/video]

  2. #2
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Try using & rather than +.



  3. The Following 2 Users Say Thank You to Blubb1337 For This Useful Post:

    Hassan (03-05-2012),NextGen1 (03-05-2012)

  4. #3
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Both "+" and "&" can be used for concatenation in Vb.net. However vb.net understands the context of "&" better and won't end up attempting to "+" (add) the string, which will give you the error you mentioned above. Your result is a Valid String but not a Valid Double. Usually this is a "problem" you see when Option Explicit is ON because Option Explicit ON will disallow the explicit conversion of String to Double. But it's a good idea to keep it on, so "&" is the better method.

    Kevin had it right, I just wanted to quickly explain why, because (IMO) if you don't understand why, you may continuously make the same "mistake".


     


     


     



    The Most complete application MPGH will ever offer - 68%




  5. #4
    ecaep42's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Posts
    123
    Reputation
    10
    Thanks
    11
    My Mood
    Relaxed
    I tried with the & but it still gives me an error.

    "Conversion from string "26\program.exe" to type 'integer' is not valid" using the same source but with an ampersand.

    Edit; nevermind. /solved i just used a different method.
    Last edited by ecaep42; 03-05-2012 at 09:17 PM.
    HOW TO GET A ADMIN/MODS ATTENTION:
    1) Find a reason to get their attention.
    2) Post a outside link to a broken file (Such as Med-ia Fire, Mega, and even youtube (Since they hate outside links so much)).
    3) Yell and call other people ******s
    4) Become a closet homosexual
    5) Watch as the mods try to ban you, but cant because its a fake url and they fell for your trick.
    6) Report them to a higher-admin.
    7) Watch them get demoted and banned

    ᕙ( ͡° ͜ʖ ͡°)ᕗ OBEY MY DOG ᕙ( ͡° ͜ʖ ͡°)ᕗ


    [url]https://www.youtube.com/watch?v=7cw2DllsZmc]https://www.youtube.com/watch?v=7cw2DllsZmc[/video]

  6. #5
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Quote Originally Posted by ecaep42 View Post
    I tried with the & but it still gives me an error.

    "Conversion from string "26\program.exe" to type 'integer' is not valid" using the same source but with an ampersand.
    That is because when you will try to convert a non-integer to an integer, it will throw an error. Also, post your code if you want further help.

  7. The Following User Says Thank You to Hassan For This Useful Post:

    NextGen1 (03-05-2012)

  8. #6
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Apparently it's been solved. But in the future we request (if nothing else) Declarations and any source related to the issue "&" the source before and after the break.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  9. The Following User Says Thank You to NextGen1 For This Useful Post:

    Hassan (03-06-2012)

  10. #7
    ecaep42's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Posts
    123
    Reputation
    10
    Thanks
    11
    My Mood
    Relaxed
    Quote Originally Posted by NextGen1 View Post
    Apparently it's been solved. But in the future we request (if nothing else) Declarations and any source related to the issue "&" the source before and after the break.
    I just changed "dim blahblah as string = thatcode()" to "Process.Start(appdata & "\Program.exe")".
    HOW TO GET A ADMIN/MODS ATTENTION:
    1) Find a reason to get their attention.
    2) Post a outside link to a broken file (Such as Med-ia Fire, Mega, and even youtube (Since they hate outside links so much)).
    3) Yell and call other people ******s
    4) Become a closet homosexual
    5) Watch as the mods try to ban you, but cant because its a fake url and they fell for your trick.
    6) Report them to a higher-admin.
    7) Watch them get demoted and banned

    ᕙ( ͡° ͜ʖ ͡°)ᕗ OBEY MY DOG ᕙ( ͡° ͜ʖ ͡°)ᕗ


    [url]https://www.youtube.com/watch?v=7cw2DllsZmc]https://www.youtube.com/watch?v=7cw2DllsZmc[/video]

  11. #8
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Because you had your closing parenthesis in the wrong spot for 'GetFolderPath' function.

    It *should* have been:
    Code:
    Dim appDataPath As String = IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "program.exe")

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  12. #9
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    GOD DAMN ! SUCH A NOOB.
    Marked Solved.

Similar Threads

  1. this account is not valid with beta version
    By PasterOfMuppets in forum CrossFire Discussions
    Replies: 5
    Last Post: 09-06-2011, 09:39 AM
  2. [Help] Deleting Spaces From String!
    By Braco22 in forum C++/C Programming
    Replies: 4
    Last Post: 09-01-2011, 01:20 PM
  3. [Help Request] Conversion from DTX to Photoshop
    By VLG in forum Combat Arms Mod Help
    Replies: 1
    Last Post: 07-28-2011, 10:09 PM
  4. Not a valid win32 application
    By terence in forum General Game Hacking
    Replies: 1
    Last Post: 02-03-2006, 06:52 AM