Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] Runs all source files as suppose to, but one

Author
Message
Unseen Ghost
22
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Ohio
Posted: 4th Feb 2022 16:58 Edited at: 4th Feb 2022 17:01
Hi,

I can't figure out why the program runs fine until my DifficultyLevel #Include file. It opens it and shows the menu on screen for about a half second and moves on to the next menu. I don't have any variables being saved yet, just getting button detection working for now. The only league button thatcurrently has anything after it is the "English" league.

List of code is in order of use
Main code source


Splash Screen #Include


Player Number Selection #Include


Enter Sir Name #Include


Select Team #Include


Difficulty Level #Include


I will be reducing some code to one routine to get rid of the mess. Like the button color I know I can put SetVirtualButtonColor() into a For Next loop to set the buttons all to the same color
Gigabyte Board/ AMD 3.3 Ghtz Quad core/8GB Ram/Nvidia Geforce 1080 GTX 8GB/1TB Western Dig. SSD/Windows 10 Home/Dark Basic Pro 9Ex/AGK2/AGKStudio

No one cares how much you know until they know how much you care.

The author of this post has marked a post as an answer.

Go to answer

JosephB
18
Years of Service
User Offline
Joined: 12th Sep 2006
Location:
Posted: 4th Feb 2022 18:14
This post has been marked by the post author as the answer.
Might be that T_Wallet#, which is set in the main code as Global T_Wallet# is probably already = 0.00, so the line, Until T_Wallet# = 20000000.00 Or T_Wallet# = 10000000.00 Or T_Wallet# = 5000000.00 Or T_Wallet# = 1000000.00 Or T_Wallet# = 100000.00 Or T_Wallet# = 0.00[, in the difficulty level will execute.
Unseen Ghost
22
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Ohio
Posted: 4th Feb 2022 18:36 Edited at: 4th Feb 2022 20:29
Quote: "Might be that T_Wallet#, which is set in the main code as Global T_Wallet# is probably already = 0.00, so the line, Until T_Wallet# = 20000000.00 Or T_Wallet# = 10000000.00 Or T_Wallet# = 5000000.00 Or T_Wallet# = 1000000.00 Or T_Wallet# = 100000.00 Or T_Wallet# = 0.00[, in the difficulty level will execute."


Thank you JosephB,
To test it I remmed out Or T_Wallet = 0.00 and it worked.

I need to figure out how I can include T_Wallet = 0.00 as one of the options because it will allow the user to choose to start the game with $0

I have also removed unnecessary SetVirtualButtoncolor() and SetVirtualButtonAlpha() commands because I set it up after button creation in a For/Next loop. I had to do that in numerous #Include files LOL. I'm trying to clean up the code + make it more versitile.
Gigabyte Board/ AMD 3.3 Ghtz Quad core/8GB Ram/Nvidia Geforce 1080 GTX 8GB/1TB Western Dig. SSD/Windows 10 Home/Dark Basic Pro 9Ex/AGK2/AGKStudio

No one cares how much you know until they know how much you care.
Unseen Ghost
22
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Ohio
Posted: 4th Feb 2022 22:38
I changed the loop from Repeat/Until to Do/Loop and added the Exit command to each button detection If statement and it works perfectly
Gigabyte Board/ AMD 3.3 Ghtz Quad core/8GB Ram/Nvidia Geforce 1080 GTX 8GB/1TB Western Dig. SSD/Windows 10 Home/Dark Basic Pro 9Ex/AGK2/AGKStudio

No one cares how much you know until they know how much you care.
JosephB
18
Years of Service
User Offline
Joined: 12th Sep 2006
Location:
Posted: 4th Feb 2022 22:43
Maybe try something as follows for the Until statement:

Until GetVirtualButtonReleased(1) OrGetVirtualButtonReleased(2) Or GetVirtualButtonReleased(3) Or GetVirtualButtonReleased(4) Or GetVirtualButtonReleased(5) Or GetVirtualButtonReleased(6)

While there are several ways to do this, using the above code would not require much change to your current code.
Unseen Ghost
22
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Ohio
Posted: 6th Feb 2022 03:46
Quote: "Until GetVirtualButtonReleased(1) OrGetVirtualButtonReleased(2) Or GetVirtualButtonReleased(3) Or GetVirtualButtonReleased(4) Or GetVirtualButtonReleased(5) Or GetVirtualButtonReleased(6)"


Thank you JosephB I might try that. Currently with the way I have it with the do/loop it works great, but I might switch it. I actually perfer not to use the do/loop
Gigabyte Board/ AMD 3.3 Ghtz Quad core/8GB Ram/Nvidia Geforce 1080 GTX 8GB/1TB Western Dig. SSD/Windows 10 Home/Dark Basic Pro 9Ex/AGK2/AGKStudio

No one cares how much you know until they know how much you care.

Login to post a reply

Server time is: 2024-11-21 13:10:18
Your offset time is: 2024-11-21 13:10:18