Skip to content

Constants seems not working #559

@iamjexcdevvv

Description

@iamjexcdevvv

Hi @ADRFranklin am I doing wrong? using sampctl build live still outputs 'Building for dev mode'

"builds": [
{
"name": "dev",
"args": [
"-;+",
"-(+",
"-d3",
"-Z+"
],
"constants": {
"ENV_PRODUCTION": "0"
},
"compiler": {
"site": "github.com",
"user": "openmultiplayer",
"repo": "compiler",
"version": "3.10.11"
}
},
{
"name": "live",
"args": [
"-;+",
"-(+",
"-O1",
"-Z+"
],
"constants": {
"ENV_PRODUCTION": "1"
},
"compiler": {
"site": "github.com",
"user": "openmultiplayer",
"repo": "compiler",
"version": "3.10.11"
}
}
]

#define ENV_PRODUCTION 0

// ---------------------------------------
#if ENV_PRODUCTION == 1
#define MAX_PLAYERS 100
#warning Building for production mode
#else
#define MAX_PLAYERS 5
#warning Building for dev mode
#endif

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