# Save Data Table Value (Region)

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

Saves a region 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
  • region — Value

Returns — void

native void DataTableSetRegion(
	bool global,
	string name,
	region val,
);

Category: Data Table / Save Value

# Examples

# mods/heroesdata.stormmod

GameLib.galaxy

// L4586
DataTableSetRegion(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldOpen_C, libGame_gv_eventParam_MapUnderworldOpen_Underworld_C), lp_underworld)

# mods/heroesdata.stormmod

HeroesLib.galaxy

// L3355
DataTableSetRegion(true, libCore_gf__UnitDataName(libCore_ge__UnitDataType_Point, lp_unit, lp_index), lp_region)

# mods/heroesmapmods/battlegroundmapmods/volskayamechanics.stormmod

LibVLSK.galaxy

// L547
DataTableSetRegion(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointWarningCreated_C, libVLSK_gv_eventParam_VolskayaPointWarningCreated_Region_C), lp_position)
// L566
DataTableSetRegion(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointEnabled_C, libVLSK_gv_eventParam_VolskayaPointEnabled_Region), lp_position)
// L585
DataTableSetRegion(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointCompleted, libVLSK_gv_eventParam_VolskayaPointCompleted_Region), lp_position)
// L611
DataTableSetRegion(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointOwnershipChanged_C, libVLSK_gv_eventParam_VolskayaPointOwnershipChanged_Region_C), lp_position)