Results 1 to 5 of 5

Thread: [VB6] If Statement Calculation Wrong?

  1. #1

    Integra's Avatar
    Join Date
    Nov 2013
    Gender
    Location
    Somewhere Down Under
    Posts
    210
    Thanks
    52
    Thanked 35 Times in 24 Posts


    Downloads
    22
    Uploads
    0
    Mentioned
    11 Post(s)
    Time Online
    4 d 9 h 3 m
    Avg. Time Online
    4 m
    Rep Power
    5

    [VB6] If Statement Calculation Wrong?

    Hi all,

    This one is bothering me beyond belief at the moment. I have an if Statement in my current program (Score Sender List Maker) and its working for most games, but then, on the odd game and its a particular game like Escape from Meridell Castle and Meerca Chase II it just goes wrong, wrong wrong!



    So in the case of Escape from Meridell the lblTest = 310 and the lblScore52 = 1741, now for whatever reason, the game is setting my Mod to 40 which is basically my trigger for saying hey, you can't earn 1000 nps from this game, even though the score is below the high scores :\ Its like its picking something wrong thats not wrong.

  2. #2
    Saiyan Race





    Infamous Joe's Avatar
    Join Date
    Dec 2011
    Gender
    Location
    Hyperbolic Time Chamber
    Age
    26
    Posts
    9,751
    Thanks
    2,779
    Thanked 16,229 Times in 4,237 Posts


    Downloads
    23
    Uploads
    36
    Mentioned
    2985 Post(s)
    Time Online
    293 d 13 h 51 m
    Avg. Time Online
    3 h 44 m
    Rep Power
    10
    Gamer IDs

    Gamertag: Infam0us Joe Steam ID: infamousjoe

  3. #3

    Integra's Avatar
    Join Date
    Nov 2013
    Gender
    Location
    Somewhere Down Under
    Posts
    210
    Thanks
    52
    Thanked 35 Times in 24 Posts


    Downloads
    22
    Uploads
    0
    Mentioned
    11 Post(s)
    Time Online
    4 d 9 h 3 m
    Avg. Time Online
    4 m
    Rep Power
    5
    Now its throwing an error with my while loop :\ Says I have a Loop without Do but I have the Do .... and no other Do's anywhere:



    I hate the fact I can't work out what the hell it is doing and why :\

  4. #4
    Little Brother


    Zachafer's Avatar
    Join Date
    Dec 2011
    Gender
    Posts
    1,206
    Thanks
    723
    Thanked 1,392 Times in 651 Posts


    Downloads
    81
    Uploads
    17
    Mentioned
    497 Post(s)
    Time Online
    21 d 17 h 32 m
    Avg. Time Online
    16 m
    Rep Power
    14
    I properly indented your code and the error popped right out


  5. #5

    Integra's Avatar
    Join Date
    Nov 2013
    Gender
    Location
    Somewhere Down Under
    Posts
    210
    Thanks
    52
    Thanked 35 Times in 24 Posts


    Downloads
    22
    Uploads
    0
    Mentioned
    11 Post(s)
    Time Online
    4 d 9 h 3 m
    Avg. Time Online
    4 m
    Rep Power
    5
    *sigh* The Uni Lecturer could only get indenting into my head when assignments were needed :\ I suppose I owe you a big thanks then @Zachafer !!

    However, in light of all this @Infamous Joe, I still have the issue of not being able to get it to calculate correctly, eg Gadsgads Game which was working fine earlier is now doing the same thing. I don't understand how the if statement can get it wrong if the damn values say that the statement is false and therefore it cannot do what it is doing.

    Its nearly got to be with the formatting of the values stored in the labels doesn't it? The comma's must be throwing something out of whack :\

    Edit:
    Never mind, declaring Score5 as Long instead of Integer would of helped greatly! And reordering some stuff has fixed most of it, now to just clean it up and remove any unnecessary crap!
    Last edited by Integra; 11-17-2013 at 06:12 AM.

Posting Permissions

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