public static int GetInteger(NWN2ScriptVarTable variables, string name) { try { return variables.GetVariable(name).ValueInt; } catch { return 0; } }