Skip to content

FCVAR_* constants produce warnings for CreateConVar #88

@b0mbie

Description

@b0mbie

Doing something like:

CreateConVar("enable_the_thing", '1', FCVAR_REPLICATED)

... will make LuaLS erroneously produce a warning:

Cannot assign `integer` to parameter `(`FCVAR_ARCHIVE_XBOX`|`FCVAR_ARCHIVE`|`FCVAR_CHEAT`|`FCVAR_CLIENTCMD_CAN_EXECUTE`|`FCVAR_CLIENTDLL`...(+19))?`.
- `integer` cannot match `(`FCVAR_ARCHIVE_XBOX`|`FCVAR_ARCHIVE`|`FCVAR_CHEAT`|`FCVAR_CLIENTCMD_CAN_EXECUTE`|`FCVAR_CLIENTDLL`...(+19))?`
- Type `integer` cannot match `nil`
- Type `number` cannot match `nil`
- Type `integer` cannot match `number[]`
- Type `number` cannot match `number[]`

I can only assume that this is somehow because of either the type definition for FCVAR, or the type of the FCVAR_* constants.

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