| View previous topic :: View next topic |
| Author |
Message |
Einhuhn Cheater
Reputation: 0
Joined: 06 Apr 2022 Posts: 44
|
Posted: Sun Jan 14, 2024 10:13 am Post subject: My Tutorial Game crash on this Code. What's wrong? |
|
|
cmp [rax+70],1 <- Enemy's stand on 0070 on 1. Player on 0
je Enemy <- Jump to the "Enemy" entry if 0070 1
add [rax]+60],1 <- Stand on 0060 for the maximal HP. For the Player
and the both Enemy's.
Because the CMP only the Player
become this. Because he has on 70 a 0.
Enemy:
sub [rax+60],1 <- Because the CMP, only the both Enemy's
become this. Because he has on 70 a 1.
ret
jmp return
What is wrong?
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Sun Jan 14, 2024 10:56 am Post subject: |
|
|
Assuming that you do not have comments written out in your script like you have shown here, then one thing that stands out is this:
Should probably read:
|
|
| Back to top |
|
 |
Einhuhn Cheater
Reputation: 0
Joined: 06 Apr 2022 Posts: 44
|
Posted: Sun Jan 14, 2024 6:29 pm Post subject: |
|
|
| ++METHOS wrote: | Assuming that you do not have comments written out in your script like you have shown here, then one thing that stands out is this:
Should probably read:
|
Yes. I had written too fast. I'm even embarrassed now, because I didn't even notice the error, even when I wrote the code here in the forum.
Thanks for pointing out my mistake.
|
|
| Back to top |
|
 |
|