For Loop Problem

@Creator27 - I often use print statements in a function called from a key routine (even sometimes draw() and usually operated when a Boolean parameter is set). Also, don’t forget to use output.clear() unless you want tomonitor change then writing to a tab is better

@Bri_G, are you able to give me a brief rundown on what exactly print statements are?

@dave1707, yeah I think you’re probably right about that. Apologies if I got a bit annoying :slight_smile:

@Creator27 Why are you asking “what exactly print statements are”. I just looked thru your code and you have several print statement in there now. So apparently you know what print statement are.

I’m able to somewhat run your code, but I haven’t the slightest idea of what’s supposed to happen or how to do anything. That kind of hinders trying to find what problems you’re having.

@dave1707, in the project you move the capsule (the player) around using your finger on the left side of the screen. If your finger moves across to the other half of your screen then the player will stop moving. If you double tap on the right side of your screen, a red sphere will appear to try to eliminate you. In order to stop it from doing that, you must press the explosion button to shoot but be warned as you only have 25 bullets to shoot before you have to reload in which you tap the shoot button again. Also, sorry if the shooting doesn’t work well, I will try to get to that. If you kill the red sphere, another one will spawn and so on and so on. But when you kill the very second red sphere that spawns, that’s where the problem is.

@Creator27 Another problem with running your code are the assets. Because you’re not using builtin assets, when you post your code, none of your assets are included and kick out as errors when the code is run. Built in assets can be used to get the code to run, but then nothing makes any sense because none of the sprites match anything. So the code is almost useless to try to run let alone try to debug. So that’s why no one is coming up with a solution to your problem.

@Creator27 I am interested in trying to help you, not so much with your current specific problem, but with learning how to build a program like this one, so that you, and people who might help you, can understand it, test it, make fewer mistakes, and debug it when it doesn’t work.

Doing that would entail a lot of work on my part, and even more on yours. Would such a thing be interesting to you?

@RonJeffries Would you be doing that in this forum. That might be interesting to a lot of other people, including me. I’m more of a hacker programmer and don’t really follow any kind of rules. I just code until it works and if it’s something that I want share or just keep for myself, I’ll go thru the code and try to make it more compact and readable.

I’m not sure how best to do it. It seems to me that @Creator27 may have very little programming experience—and I am quite impressed with how much they have done if that’s the case—so it might have to start pretty basic. I’m not sure if it fits the forum style, or what. Usually, of course, I’d start a category on my web site for it.

Let’s kick around some possibilities? What do you think would be ideal?

@RonJeffries Maybe on your site would be better. Just wasn’t sure how you were going to do it, how basic it would be, or if it would be open to discussion/questions.

One issue with my site is that I don’t allow comments. That is something to take into consideration. Maybe articles there and questions here?

@RonJeffries That would probably work OK.

@RonJeffries - it’s worked before so probably will again. I’d like to see your approach.

well just a random notion at the moment, not sure how valuable it would be.

@RonJeffries, two things. Yes you are right, I don’t have a lot of programming language though I have dabbled in C# and am somewhat fluent in Lua. And I know this might be annoying to hear, but I’ve scrapped the idea anyways and I’m working on a different sort-of idea in the game. Apologies for not telling you earlier!

ok

My take away from this is that the forum has several members who are rather skilled and willing to create examples to help noobs and pro hacker coders alike on the “proper standards” of coding. I too would be interested in helping with that endeavor.

@Creator27 the main thing to take from this string for you personally is that we are willing to help. The way other programmers can help is by having a dedicated example program that grows as a demonstration. Preferably in a manner that can be useful for all who come after. If you so desire such help personally, you need only ask, and to be willing to see said example project to the end.

Man I love this forum