Skip to content

SendClientMessage custom format specifiers bugged with negative numbers #742

Closed

Description

@Vince0789

Describe the bug
Using the format "%04d" and the value -1 yields an incorrect results.

To Reproduce

public OnPlayerSpawn(playerid)
{
    new string[24];
    format(string, sizeof string, "%04d", -1);
    SendClientMessage(playerid, -1, string);

    SendClientMessage(playerid, -1, "%04d", -1);
    return 1;
}

afbeelding

Expected behavior
Both should produce the output -0001.

Screenshots and/or logs
See above.

Commit hash in master
e2fdba7

Activity

  1. added
    bug
    on Oct 15, 2023
  2. Vince0789 commented on Oct 15, 2023

    @Vince0789
    Author

    Looks like it's an OBOE error.
    afbeelding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugnightly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions