Author Topic: Can someone look at my code to see where I am going wrong ?  (Read 3789 times)

0 Members and 1 Guest are viewing this topic.

Offline rcamp48

  • Newbie
  • Posts: 62
    • View Profile
Can someone look at my code to see where I am going wrong ?
« on: November 29, 2018, 04:45:39 pm »
Hi I have 4 programs for various lotteries, and for the life of me I cannot figure out where I am going wrong with my coding . maybe the logic, maybe the coding , anyways I have source and data files for the Lotto 649 lottery, Lotto Max lottery, and daily Keno both midday and evening , all based in Ontario, Canada. Some of the bugs I can figure out but the one with Lotto Max picking numbers and displaying them should be fairly straight forward. Anyways I have enclosed a zip file with all of the qb64 basic programs and all of the data needed. Thanks a lot guys for any help you can provide. Russ
* Master.zip (Filesize: 283.72 KB, Downloads: 175)
Russ Campbell
rcamp48@rogers.com
BBS Files Programmer

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Can someone look at my code to see where I am going wrong ?
« Reply #1 on: December 01, 2018, 11:09:10 am »
Can you isolate the problem in a stripped down program and give a better description of the problem?

Sometimes this will help you discover the problem yourself.

Offline rcamp48

  • Newbie
  • Posts: 62
    • View Profile
Re: Can someone look at my code to see where I am going wrong ?
« Reply #2 on: December 01, 2018, 07:23:47 pm »
OK I will see what I can do , it pretty well needs the data files but I will comment better in the program about what I am trying to do. Russ
Russ Campbell
rcamp48@rogers.com
BBS Files Programmer

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Can someone look at my code to see where I am going wrong ?
« Reply #3 on: December 01, 2018, 10:34:13 pm »
A way you might isolate the problem is to rebuild the program from scratch (or comment everything out). Keep adding chunks of code (or uncommenting) until the problem shows up.

PS I am doing this myself today, working on an auto pilot for the Lander programs. It's hell when the controls or code start working against each other and burn up fuel while the lander floats straight up over the landing site.
« Last Edit: December 01, 2018, 10:44:43 pm by bplus »

Offline rcamp48

  • Newbie
  • Posts: 62
    • View Profile
Re: Can someone look at my code to see where I am going wrong ?
« Reply #4 on: December 02, 2018, 02:33:24 am »
Its way to big to rebuild from scratch but I have a working copy from my old qb45 lott2009.bas program, and I have printed out the code from both programs I know basically where it is failing , I get zeros i the area where I should get random or chosen numbers from the C and D options of the LottoMax.bas program. That may help to narrow it down the label to look for I will get for you tonight, on another note, I am adding all 4 programs as is to a linux version of qb64 , the code will be the same but the executables will be for linux. Just another way of branching out and as I have always liked linux I will soon make working copies available in linux. I needed a break from programming for a few days to give myself a fresh prospective, and as soon as I get linux installed on my new acer laptop I will start programming again. Nice to see that  other users have problems with code too. Russ
Russ Campbell
rcamp48@rogers.com
BBS Files Programmer