cvars.AddChangeCallback - It doesn't work for CreateConVar var or I'm being stupid.

My single player:



] lua_run CreateConVar("testvarthing",1337) cvars.AddChangeCallback("testvarthing", function(...) print(...) end)
> CreateConVar("testvarthing",1337) cvars.AddChangeCallback("testvarthing", function(...) print(...) end)...
] testvarthing 123
] testvarthing
"testvarthing" = "123" ( def. "1337" )
 clientcmd_can_execute


My multiplayer (timer bit is unpaused, just to be sure):



] lua_run CreateConVar("testvarthing",1337) cvars.AddChangeCallback("testvarthing", function(...) print(...) end)
> CreateConVar("testvarthing",1337) cvars.AddChangeCallback("testvarthing", function(...) print(...) end)...
] testvarthing 123
] testvarthing
"testvarthing" = "123" ( def. "1337" )
 clientcmd_can_execute


Someone else’s single player:


 ] lua_run_con CreateConVar("deco",9000) cvars.AddChangeCallback("deco", function(cvar,prv,new) print("Changed Deco to: "..new) end)
] deco lol
] deco
"deco" = "lol" ( def. "9000" )


Someone else’s dedicated server:


] lua_run CreateConVar("testvarthing",1337) cvars.AddChangeCallback("testvarthing", function(...) print(...) end)
> CreateConVar("testvarthing",1337) cvars.AddChangeCallback("testvarthing", function(...) print(...) end)...
] testvarthing omgavalue


(nothing follows)

I’ve tried it with different convar names and all.

I just want to make sure I haven’t had 3 (or 4) occurrences of bad luck in a row before posting this on Get Satisfaction. I’m also hoping this get some more attention than if I were to simple post it on Get Satisfaction.

My final resort is to just make them concommands.

Halp!

I’ve had the same problem. It seems creating these at load time significantly changes your outcome.

As in, then it works. :v: