# 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.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:4586

    // Implementation
    DataTableSetUnitGroup(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldOpen_C, libGame_gv_eventParam_MapUnderworldOpen_Entrances_C), lp_entrances);
    DataTableSetRegion(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldOpen_C, libGame_gv_eventParam_MapUnderworldOpen_Underworld_C), lp_underworld);
    DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldOpen_C, libGame_gv_eventParam_MapUnderworldOpen_TotalSkull_C), lp_totalSkull);
    TriggerSendEvent(libGame_gv_eventID_MapUnderworldOpen_C);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/HeroesLib.galaxy:3355

    // Automatic Variable Declarations
    // Implementation
    DataTableSetRegion(true, libCore_gf__UnitDataName(libCore_ge__UnitDataType_Point, lp_unit, lp_index), lp_region);
}

mods/heroesmapmods/battlegroundmapmods/volskayamechanics.stormmodbase.stormdata/LibVLSK.galaxy:547

    // Automatic Variable Declarations
    // Implementation
    DataTableSetRegion(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointWarningCreated_C, libVLSK_gv_eventParam_VolskayaPointWarningCreated_Region_C), lp_position);
    TriggerSendEvent(libVLSK_gv_eventID_VolskayaPointWarningCreated_C);
}

mods/heroesmapmods/battlegroundmapmods/volskayamechanics.stormmodbase.stormdata/LibVLSK.galaxy:566

    // Automatic Variable Declarations
    // Implementation
    DataTableSetRegion(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointEnabled_C, libVLSK_gv_eventParam_VolskayaPointEnabled_Region), lp_position);
    TriggerSendEvent(libVLSK_gv_eventID_VolskayaPointEnabled_C);
}

mods/heroesmapmods/battlegroundmapmods/volskayamechanics.stormmodbase.stormdata/LibVLSK.galaxy:585

    // Automatic Variable Declarations
    // Implementation
    DataTableSetRegion(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointCompleted, libVLSK_gv_eventParam_VolskayaPointCompleted_Region), lp_position);
    DataTableSetInt(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointCompleted, libVLSK_gv_eventParam_VolskayaPointCompleted_WinningTeam), lp_winningTeam);
    TriggerSendEvent(libVLSK_gv_eventID_VolskayaPointCompleted);

mods/heroesmapmods/battlegroundmapmods/volskayamechanics.stormmodbase.stormdata/LibVLSK.galaxy:611

    // Automatic Variable Declarations
    // Implementation
    DataTableSetRegion(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointOwnershipChanged_C, libVLSK_gv_eventParam_VolskayaPointOwnershipChanged_Region_C), lp_position);
    DataTableSetInt(false, TriggerEventParamName(libVLSK_gv_eventID_VolskayaPointOwnershipChanged_C, libVLSK_gv_eventParam_VolskayaPointOwnershipChanged_NewOwner_C), lp_newOwner);
    TriggerSendEvent(libVLSK_gv_eventID_VolskayaPointOwnershipChanged_C);