# Save Data Table Value (Ping)

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

Saves a ping 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
  • int [ ping ] — Value

Returns — void

native void DataTableSetPing(
	bool global,
	string name,
	int val,
);

Category: Data Table / Save Value

# Examples

# mods/heroesdata.stormmod

HeroesLib.galaxy

// L3367
DataTableSetPing(true, libCore_gf__UnitDataName(libCore_ge__UnitDataType_Ping, lp_unit, lp_index), lp_ping)

# mods/swarm.sc2mod

SwarmLib.galaxy

// L188
DataTableSetPing(true, libHots_gf__UnitDataName(libHots_ge__UnitDataType_Ping, lp_unit, lp_index), lp_ping)