Skip to content

Is this possible #564

@tr1xy

Description

@tr1xy

Issue description:

// Doesn't throw an error
#define SOME_NUMBER 16
SendClientMessage(playerid, -1, "The number is "#SOME_NUMBER".");

// Throws an error
#define SOME_NUMBER (16)
SendClientMessage(playerid, -1, "The number is "#SOME_NUMBER".");

I think that I understand what is precompiler doing here but can this be bypassed somehow?
I think that someone was talking about implenting (num) support for #DEF but I ain't sure anymore.

Workspace Information:

  • Compiler version: 3.10.10
  • Command line arguments provided (or sampctl version): //
  • Operating System: Pop!_OS 20.04

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