Are CreateConVar flags totally broken?

I am trying to do stuff with CreateConVar, but the flags seem to be totally broken.

Here is an example:
[lua]
] lua_run CreateConVar(“sv_fff”, “asdf”, {FCVAR_ARCHIVE, FCVAR_REPLICATE})
> CreateConVar(“sv_fff”, “asdf”, {FCVAR_ARCHIVE, FCVAR_REPLICATE})…
] sv_fff
“sv_fff” = “asdf”
clientcmd_can_execute
[/lua]

The flags are not applying at all. Anyone know the problem?

They seem to apply fine for me, even through that it doesn’t show it there.

Totally not working for me. Another example:

[lua]

] lua_run CreateConVar(“aaa”, “lol”, {FCVAR_REPLICATE, FCVAR_CHEAT})
> CreateConVar(“aaa”, “lol”, {FCVAR_REPLICATE, FCVAR_CHEAT})…
] aaa
“aaa” = “lol”
clientcmd_can_execute
] aaa fe
] aaa
“aaa” = “fe” ( def. “lol” )
clientcmd_can_execute
[/lua]
As you can see, I changed a FCVAR_CHEAT convar, which shouldn’t be able to happen.

I think it’s FCVAR_REPLICATED, not REPLICATE. But I don’t think it’ll solve your problem.

If you mess up a flag (FCVAR_REPLICATE -> FCVAR_REPLICATED) then all other flags behind it will become obsolete.

[editline]02:54PM[/editline]
[lua]

] lua_run CreateConVar(“aaa”, “lol”, {FCVAR_REPLICATE, FCVAR_CHEAT})
> CreateConVar(“aaa”, “lol”, {FCVAR_REPLICATE, FCVAR_CHEAT}) …
] aaa
“aaa” = “lol”
clientcmd_can_execute
] aaa bbb
] aaa
“aaa” = “bbb” ( def. “lol” )
clientcmd_can_execute
] lua_run CreateConVar(“aaa2”, “lol”, {FCVAR_REPLICATED, FCVAR_CHEAT})
> CreateConVar(“aaa2”, “lol”, {FCVAR_REPLICATED, FCVAR_CHEAT})…
] aaa2
“aaa2” = “lol”
cheat replicated clientcmd_can_execute
] aaa2 bbb
Can’t use cheat cvar aaa2 in multiplayer, unless the server has sv_cheats set to 1.
[/lua]

As a side note, you can also do this:



CreateConVar( "some name", "some var", FCVAR_REPLICATED | FCVAR_CHEAT )


It’s really just if you want to create a table or not.

If garry was smart he would unreference the table anyways, so I don’t think it matters.