sourcemod
sourcemod copied to clipboard
GetConVarInt() and ConVar.IntValue
GetConVarInt() and ConVar.IntValue return wrong number. When number is odd that functions fix it to even number.
Example:
27607405 = 27607404 27607407 = 27607408
On what game? Many supported games set the int value from the float value (which loses precision with high numbers like that).
On what game? Many supported games set the int value from the float value (which loses precision with high numbers like that).
CS:GO
Sorry, one more follow-up question...
How is the ConVar value being set in this case?
- Via config or direct in game console?
- Via SM in code? If so, SetConVarString? SetConVarFloat? SetConVarInt?
- Some other way?
How is the ConVar value being set in this case?
ConVar CVAR;
(CVAR = CreateConVar("swgm_groupid", "XXXXXXXX", "Steam group ID.")).AddChangeHook(OnGroupChange);
g_iGroupId = CVAR.IntValue;