message: Update NWNX_Player_StopGuiTimingBar to hide the internal ID variable from end users.
diff: @@ -9,7 +9,7 @@ void NWNX_Player_StartGuiTimingBar(object player, float seconds, string script =
  // Stops displaying a timing bar.
  // Runs a script if specified.
  -void NWNX_Player_StopGuiTimingBar(object player, string script = "", int id = -1);
  +void NWNX_Player_StopGuiTimingBar(object player, string script = "");
  const string NWNX_Player = "NWNX_Player";
  @@ -22,28 +22,9 @@ void NWNX_Player_ForcePlaceableExamineWindow(object player, object placeable)
  NWNX_CallFunction(NWNX_Player, sFunc);
  }
  -void NWNX_Player_StartGuiTimingBar(object player, float seconds, string script = "")
  -{
  - // only one timing bar at a time!
  - if (GetLocalInt(player, "GUI_TIMING_ACTIVE"))
  - return;
  -
  - string sFunc = "StartGuiTimingBar";
  - NWNX_PushArgumentFloat(NWNX_Player, sFunc, seconds);
  - NWNX_PushArgumentObject(NWNX_Player, sFunc, player);
  -
  - NWNX_CallFunction(NWNX_Player, sFunc);
  -
  - int id = GetLocalInt(player, "GUI_TIMING_ID") + 1;
  - SetLocalInt(player, "GUI_TIMING_ACTIVE", id);
  - SetLocalInt(player, "GUI_TIMING_ID", id);
  -
  - DelayCommand(seconds, NWNX_Player_StopGuiTimingBar(player, script, id));
  -}
  -
  -void NWNX_Player_StopGuiTimingBar(object player, string script = "", int id = -1)
  +void NWNX_Player_INTERNAL_StopGuiTimingBar(object player, string script = "", int id = -1)
  {
  - int activeId = GetLocalInt(player, "GUI_TIMING_ACTIVE");
  + int activeId = GetLocalInt(player, "NWNX_PLAYER_GUI_TIMING_ACTIVE");
  // Either the timing event was never started, or it already finished.
  if (activeId == 0)
  return;
  @@ -52,7 +33,7 @@ void NWNX_Player_StopGuiTimingBar(object player, string script = "", int id = -1
  if (id != -1 && id != activeId)
  return;
  - DeleteLocalInt(player, "GUI_TIMING_ACTIVE");
  + DeleteLocalInt(player, "NWNX_PLAYER_GUI_TIMING_ACTIVE");
  string sFunc = "StopGuiTimingBar";
  NWNX_PushArgumentObject(NWNX_Player, sFunc, player);
  @@ -63,3 +44,27 @@ void NWNX_Player_StopGuiTimingBar(object player, string script = "", int id = -1
  ExecuteScript(script, player);
  }
  }
  +
  +void NWNX_Player_StartGuiTimingBar(object player, float seconds, string script = "")
  +{
  + // only one timing bar at a time!
  + if (GetLocalInt(player, "NWNX_PLAYER_GUI_TIMING_ACTIVE"))
  + return;
  +
  + string sFunc = "StartGuiTimingBar";
  + NWNX_PushArgumentFloat(NWNX_Player, sFunc, seconds);
  + NWNX_PushArgumentObject(NWNX_Player, sFunc, player);
  +
  + NWNX_CallFunction(NWNX_Player, sFunc);
  +
  + int id = GetLocalInt(player, "NWNX_PLAYER_GUI_TIMING_ID") + 1;
  + SetLocalInt(player, "NWNX_PLAYER_GUI_TIMING_ACTIVE", id);
  + SetLocalInt(player, "NWNX_PLAYER_GUI_TIMING_ID", id);
  +
  + DelayCommand(seconds, NWNX_Player_INTERNAL_StopGuiTimingBar(player, script, id));
  +}
  +
  +void NWNX_Player_StopGuiTimingBar(object player, string script = "")
  +{
  + NWNX_Player_INTERNAL_StopGuiTimingBar(player, script, -1);
  +}
  \ No newline at end of file
  