# Save Data Table Value (Timer)

Grammar — Save value as name in the scope|Global/Local data table
FlagsNative | Action

Saves a timer value into a data table. Data tables allow you to store and recall values using a string identifier. If you save a data table value using a string identifier that already exists, you will overwrite the old value, even if it is a different data type than the value you are saving.

# Arguments

  • bool [ preset::DataScope ] — Scope
  • string — Name
  • timer — Value

Returns — void

native void DataTableSetTimer(
	bool global,
	string name,
	timer val,
);

Category: Data Table / Save Value

# Examples

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L9300
DataTableSetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective), lp_timer)

# mods/starcoop/starcoop.sc2mod

LibCOMU.galaxy

// L4252
DataTableSetTimer(true, ("RiftTimer" + IntToString(libCOMU_gv_cT_VoidRiftCount)), TimerCreate())
// L4254
DataTableSetTimer(true, ("RiftTrickleTimer" + IntToString(libCOMU_gv_cT_VoidRiftCount)), TimerCreate())
// L11844
DataTableSetTimer(true, ("RiftTimer" + IntToString(FixedToInt(UnitGetCustomValue(lv_rift, 0)))), null)
// L11845
DataTableSetTimer(true, ("RiftTrickleTimer" + IntToString(FixedToInt(UnitGetCustomValue(lv_rift, 0)))), null)