If you check the functions list we have all this for variable management:
void SetLocalVarInt(string& asName, int alVal);
void SetLocalVarFloat(string& asName, float afVal);
// asVal has to be constant
void SetLocalVarString(string& asName, string& asVal);
void AddLocalVarInt(string& asName, int alVal);
void AddLocalVarFloat(string& asName, float afVal);
void AddLocalVarString(string& asName, string& asVal);
int GetLocalVarInt(string& asName);
float GetLocalVarFloat(string& asName);
string& GetLocalVarString(string& asName);
void SetGlobalVarInt(string& asName, int alVal);
void SetGlobalVarFloat(string& asName, float afVal);
// asVal has to be constant
void SetGlobalVarString(string& asName, string& asVal);
void AddGlobalVarInt(string& asName, int alVal);
void AddGlobalVarFloat(string& asName, float afVal);
void AddGlobalVarString(string& asName, string& asVal);
int GetGlobalVarInt(string& asName);
float GetGlobalVarFloat(string& asName);
string& GetGlobalVarString(string& asName);
Maybe you have to set it first with SetLocalVarInt. Or if that doesn't work try using GlobalVars.
Now I see you use AddLocalVarInt to add the values, but you are using GetGlobalVarInt, my guess is that it should be GetLocal and that you have to set the variable with SetLocalVar before using it.