• Replicated ConVars not Replicating?
    0 replies, posted
This error came out of the blue. After hours of total testing and gameplay we've had with my new gamemode, suddenly my friend found that his client no longer thought the replicated ConVars existed (ConVarExists false, nil values etc.). This happened after no change was made to anything with these ConVars, in the middle of one random testing session. Nothing else seemed to cause errors. Why are these ConVars (suddenly) not replicating anymore? [CODE]-- 1st attempt method CreateConVar( "ytl_gametype", GetConVar("ytl_startgametype"):GetInt(), { FCVAR_SERVER_CAN_EXECUTE, FCVAR_REPLICATED } ) print("Set gametype start to "..GetConVar("ytl_startgametype"):GetInt()) -- 2nd attempt method if GetConVar("ytl_startbombshowtime"):GetBool() then CreateConVar( "ytl_bombshowtime", 1, { FCVAR_SERVER_CAN_EXECUTE, FCVAR_NOTIFY, FCVAR_REPLICATED } ) else CreateConVar( "ytl_bombshowtime", 0, { FCVAR_SERVER_CAN_EXECUTE, FCVAR_NOTIFY, FCVAR_REPLICATED } ) end -- 3rd attempt method if not ConVarExists( "ytl_runnermagic" ) then CreateConVar( "ytl_runnermagic", 0, { FCVAR_SERVER_CAN_EXECUTE, FCVAR_NOTIFY, FCVAR_REPLICATED } ) end[/CODE] There's 3 different methods I've tried. All of these settings are linked to the main menu from gamemode.txt settings. The first one creates a new seperate ConVar that only upon creation reads the setting from gamemode.txt, but is a seperate ConVar in itself. The second method also reads a seperate setting from the menu, but doesn't directly use its value. And finally, the third just creates a replicated ConVar, while the [I]same[/I] setting is also created in gamemode.txt. This is how all 3 of them started off, but strangely the third one is the only ConVar that (for now) replicates.
Sorry, you need to Log In to post a reply to this thread.