- This topic has 39 replies, 2 voices, and was last updated 7 months, 3 weeks ago by c4cc.
-
AuthorPosts
-
2024-03-10 at 3:26 am #71458c4ccParticipant2024-03-10 at 8:14 am #71459kdvParticipant
Use debugging. See the console log.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-03-12 at 2:17 am #71529c4ccParticipantSorry for late reply. I did try to use debugging, still no change
- This reply was modified 8 months, 1 week ago by c4cc.
2024-03-12 at 8:31 am #71533kdvParticipantYour stats dictionary is empty. You did some mistake when creating a list of clones. Debug every step.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-03-13 at 7:04 am #71547c4ccParticipant2024-03-13 at 7:08 am #71548c4ccParticipantShould work exactly like here https://v3d.net/trh
Here you didn’t define the original enemy (as dicts)? Yet yours could still work
2024-03-13 at 7:39 am #71549kdvParticipantyou didn’t define the original enemy
it’s not a variable to be declared and defined.
In you case two variables used in the loop are defined after this loop did its work.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-03-13 at 8:10 am #71554c4ccParticipantIn you case two variables used in the loop are defined after this loop did its work.
I see, how did you define those variables before the loop worked? Yours were also outside the loop as well.
- This reply was modified 8 months, 1 week ago by c4cc.
2024-03-13 at 9:44 am #71556kdvParticipantI just placed them BEFORE the loop. You placed those variables AFTER the loop.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-03-13 at 3:30 pm #71565c4ccParticipantI just placed them BEFORE the loop. You placed those variables AFTER the loop.
I placed them before the loop too now, yet I can’t get the individual clones to be removed as you did?
2024-03-13 at 3:36 pm #71566kdvParticipantBEFORE the loop!!! Not inside the loop! You absolutly don”t understand what you are doing? Just forget it. I’m out, I can’t help you.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-03-13 at 6:37 pm #71569c4ccParticipantSorry for the stupid-ass mistake, I was stressed out just now doing stuff. Finally fixed it, it works now. Thanks for helping me man.
Attachments:
You must be logged in to view attached files.2024-03-15 at 9:37 am #71597c4ccParticipantBtw, I found another undefined error as highlighted:
Do I have to assign that BattleStats to a dict before the “i-enemy” loop?
- This reply was modified 8 months, 1 week ago by c4cc.
2024-03-15 at 10:09 am #71599kdvParticipantNo. You just trying to get wrong keys.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-03-15 at 2:45 pm #71604c4ccParticipantSo if I am to define that “BattleStats” outside the loop to solve that undefined error, you also didn’t define your “params” out of the loop in your example as here:
Should work exactly like here https://v3d.net/trh
Should work exactly like here https://v3d.net/trhI apologize if my question is stupid, but I don’t know how you managed to insert a dict into a loop without defining it outside the loop.
-
AuthorPosts
- You must be logged in to reply to this topic.