help with logic
BlitzMax Forums/BlitzMax Programming/help with logic
| ||
I'm having trouble seeing where the problem lies in some code i'm working on. its a friut/slot machine thing, which should simply randomize the reels, and if they are all the same then the program will do something. Also, the spin method takes a fixed result parameter, so that the outcome can be rigged to a certain result. while the fixed result part works fine, the random numbers don't, and instead of printing the right message, it re-randomizes the reels. why is this? 10 points to whoever can tell me what i'm doing wrong. Cheers Charlie |
| ||
Without any kind of useful comments it's too hard to work out what your program is doing. What are the stops and the indexes and what does each method do? |
| ||
point taken, i've added a few comments now. Cheers Charlie |
| ||
You're setting the slotresult after you checked it, so it's not likely to work out too well. also I think the nesting of Ifs is a little jumbled. This seems to work: |