Skip to content

[int] 0.5 rounds to 0 causing a script error in "Update-PrimaryUserWebhook.ps1" #1

@JEngel05

Description

@JEngel05

In testing out your script for the primary user, I found that if $PrimaryCount is set to 0.5 on line 169, because it's an Integer it rounds to 0. The script then errors when it tries to divide by 0.

I easily solved this by changing [int] to [decimal] in the 3 parts it's used in the script.
lines 133, 158, 169

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions