Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Zero divisor when unit shot #9632

Closed
szpolny opened this issue Nov 8, 2023 · 2 comments · Fixed by #9633
Closed

Error Zero divisor when unit shot #9632

szpolny opened this issue Nov 8, 2023 · 2 comments · Fixed by #9633
Labels
Milestone

Comments

@szpolny
Copy link

szpolny commented Nov 8, 2023

Mods (complete and add to the following information):

  • Arma 3: 2.14.150957 [e.g. 1.00 stable, rc, dev]
  • CBA: 3.16.1 [e.g. 3.0.0 stable, commit hash]
  • ACE3: 3.16.1 [eg. 3.0.0 stable, commit hash]

Description:
I have custom unit with custom model from this mod: https://steamcommunity.com/sharedfiles/filedetails/?id=2781344095. When i shoot this model it gives me this error.
obraz

Steps to reproduce:
Follow [https://ace3.acemod.org/img/wiki/user/issue_flowchart.webp](this flowchart)!

  1. _Go to editor place playable unit and "mutant" model from mentioned above mod.
  2. _Shoot to mutant
  3. _This error occurres

Expected behavior:
Ace medical handle unit

Where did the issue occur?

  • Editor (Singleplayer)

Log Files:

12:08:48 Error in expression <) then {
    private _armorCoef = _armor/_armorScaled;
    private _damageCoef =>
12:08:48   Error position: </_armorScaled;
    private _damageCoef =>
12:08:48   Error Zero divisor
12:08:48 File /z/ace/addons/medical_engine/functions/fnc_handleDamage.sqf..., line 430

Additional context:
Is there a way to fix it? I know that this is no ace problem, but problem specific to the mutant's mod. Maybe override these values, by editing these problematic values

@johnb432
Copy link
Contributor

johnb432 commented Nov 8, 2023

Is there a way to fix it? I know that this is no ace problem, but problem specific to the mutant's mod. Maybe override these values, by editing these problematic values

No, it's at least partially ACE problem.

@LinkIsGrim

_unit setVariable [_var, [_rags, _armor, _armorScaled]];

We should be checking if _armor is 0.

Might be even safer fixing this instead:

_return = [_armor, _armorScaled];

We should make sure that is can't return 0. Minimum armor is 1.

@LinkIsGrim
Copy link
Contributor

LinkIsGrim commented Nov 8, 2023

@johnb432

Hitpoint armor should be armor max 1, item armor should be armor max 0 because an item can not cover a hitpoint

@jonpas jonpas added this to the 3.16.2 milestone Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants