Skip to content

Accessing non-existent globalValue property causes error when stat is not global #100

@MrZak-dev

Description

@MrZak-dev

Description

When processing a player stat snapshot where the stat is not global, the code tries to access data.globalValue which doesn't exist in the response, causing a runtime error.

Steps to Reproduce

  1. Retrieve player stats for a non-global stat

Expected Behavior

The code should handle cases where globalValue is not present in the response data.

Actual Behavior

Runtime error occurs trying to access data.globalValue which is undefined in https://github.com/TaloDev/godot/blob/develop/addons/talo/entities/player_stat_snapshot.gd#L13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions