Skip to content

[BUG] colorizeValue sometimes does not return a string #482

@Darxo

Description

@Darxo

Versions

  • Game: 1.5.1.8
  • MSU: 1.7.2

Describe the bug

in the colorizeValue function there is actually no guarantee, what the type of the returned value is.
You would think it to be always a string, but in the marked path (see image), it can also be equal to the type of the input value.

To Reproduce

Steps to reproduce the behavior:

  1. Start the game with the "Dev Console" mod
  2. While in the main menu, open the console
  3. Type this into the console: return format("%s", ::MSU.Text.colorizeValue(0))
  4. See error

Expected behavior

Whenever colorizeValue returns a value, that value must be of the type "string"

Screenshots

Image

Log

log.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions