When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
33 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
Check which line that happened.
what you mean? here is line 73 ?
Like what line of your code it was trying to execute when the error happened.
I have no idea where to check it I'm not much a programmer I'm still learning by myself
Run in debug mode, when that dialog appears press Retry, then look into the Call stack window, click on the first entry that is from your code.
now I got the answer ^^
Your code is the second entry, click it and you will be led to that position.
line 70
So your i becomes out of bounds after you erased the enemy.
The next iteration is only of the inner loop which doesn't check i.
why this dont happen when depeting buller only not enemy at same time?
j would go out of bounds too
but dont happen to bullets
Because of this.
Well you change your code to match your expected logic.
I was trying to make bullet disappear when hit a enemy too and the same enemy disappear too but this is not working in the same loop because this.
Think again how you can implement such functionality.
This is all your logic, C++ just does what you tell it.
I know..
Here i is not being checked, so the most obvious thought is to make it actually be.
sometimes I even go well but are this small silly quirks in every small detail in C++ make me stop too long to get what is
when in lua is all so direct and easy
Check if it is in bounds.
This is not a C++ quirk, your logic is just flawed.
I made this way I think is working fine now
In Lua you would encounter the same kind of thing anyway.