# Store Integer

Grammar — Store integer value as key of section section in bank bank
FlagsNative | Action

Stores an Integer value to the specified Bank. The Section and Key parameters determine where the value is stored in the bank file, and must be used to load the value later. You must save a bank after storing a value, otherwise the value will not exist to load later.

# Arguments

  • bank — Bank
  • string — Section
  • string — Key
  • int — Value

Returns — void

native void BankValueSetFromInt(
	bank b,
	string section,
	string key,
	int value,
);

Category: [Bank / Store & Load](/galaxy/reference#bank-store &-load)

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L4568
BankValueSetFromInt(BankLastCreated(), lv_section, gf_TransitionalBankKey("CurrentRoom"), (gv_currentRoom))
// L4575
BankValueSetFromInt(BankLastCreated(), lv_section, gf_TransitionalBankKey("ABChoice"), (gv_abChoiceCurrent))
// L4576
BankValueSetFromInt(BankLastCreated(), lv_section, gf_TransitionalBankKey("ABChoiceDifficulty"), gf_ConvertDifficultyToInteger(gv_abChoiceDifficulty))
// L4578
BankValueSetFromInt(BankLastCreated(), lv_section, gf_TransitionalBankKey("ResearchConvertedProtoss"), gv_labResearch_ConvertProtoss)
// L4579
BankValueSetFromInt(BankLastCreated(), lv_section, gf_TransitionalBankKey("ResearchConvertedZerg"), gv_labResearch_ConvertZerg)
// L17654
BankValueSetFromInt(BankLastCreated(), "DebugCinematicShow", "Value", 0)
// L4568
BankValueSetFromInt(BankLastCreated(), lv_section, gf_TransitionalBankKey("CurrentRoom"), (gv_currentRoom))
// L4575
BankValueSetFromInt(BankLastCreated(), lv_section, gf_TransitionalBankKey("ABChoice"), (gv_abChoiceCurrent))
// L4576
BankValueSetFromInt(BankLastCreated(), lv_section, gf_TransitionalBankKey("ABChoiceDifficulty"), gf_ConvertDifficultyToInteger(gv_abChoiceDifficulty))
// L4578
BankValueSetFromInt(BankLastCreated(), lv_section, gf_TransitionalBankKey("ResearchConvertedProtoss"), gv_labResearch_ConvertProtoss)
// L4579
BankValueSetFromInt(BankLastCreated(), lv_section, gf_TransitionalBankKey("ResearchConvertedZerg"), gv_labResearch_ConvertZerg)
// L17654
BankValueSetFromInt(BankLastCreated(), "DebugCinematicShow", "Value", 0)

# campaigns/libertystory.sc2campaign

CampaignLib.galaxy

// L8750
BankValueSetFromInt(lp_bank, lp_section, lp_key, lp_value)
// L9323
BankValueSetFromInt(lp_targetBank, lv__SectionName, IntToString(0), libCamp_gv_tSX_Tutorial_HistoryCount)

# campaigns/swarmstory.sc2campaign

SwarmCampaignLib.galaxy

// L14066
BankValueSetFromInt(lp_bank, lp_section, lp_key, lp_value)

# campaigns/swarmstoryutil.sc2mod

Lib281DEC45.galaxy

// L529
BankValueSetFromInt(libSwaC_gf_StoryBank(), lv__SectionName, (lv_character), UserDataGetInt("Character", lv_character, "Unlocked", 1))
// L531
BankValueSetFromInt(libSwaC_gf_StoryBank(), lv__SectionName, (lv_character), UserDataGetInt("Character", lv_character, "Ambient", 1))
// L533
BankValueSetFromInt(libSwaC_gf_StoryBank(), lv__SectionName, (lv_character), BoolToInt(lib281DEC45_gf_CharacterHasNewInfo(lv_character)))
// L699
BankValueSetFromInt(BankLastCreated(), lv__SectionName, "CurrentRoom", (lib281DEC45_gv_zSS_CurrentRoom))

# campaigns/void.sc2campaign

MapScript.galaxy

// L5473
BankValueSetFromInt(gv_tutorialBankSave, "General", "Progress", gv_tutorialProgress)
// L9444
BankValueSetFromInt(gv_tutorialBankSave, "General", "Progress", gv_tutorialProgress)
// L15202
BankValueSetFromInt(gv_tutorialBankSave, "General", "Progress", gv_tutorialProgress)
// L18959
BankValueSetFromInt(gv_tutorialBankSave, "General", "Progress", gv_tutorialProgress)
// L5473
BankValueSetFromInt(gv_tutorialBankSave, "General", "Progress", gv_tutorialProgress)
// L9444
BankValueSetFromInt(gv_tutorialBankSave, "General", "Progress", gv_tutorialProgress)
// L15202
BankValueSetFromInt(gv_tutorialBankSave, "General", "Progress", gv_tutorialProgress)
// L18959
BankValueSetFromInt(gv_tutorialBankSave, "General", "Progress", gv_tutorialProgress)

# campaigns/voidstory.sc2campaign

VoidCampaignLib.galaxy

// L7971
BankValueSetFromInt(lp_bank, lp_section, lp_key, lp_value)

# campaigns/voidstory.sc2campaign

VoidCampaignStoryLib.galaxy

// L744
BankValueSetFromInt(lv_storyBank, lv__SectionName, (lv_indexClickable), UserDataGetInt("Clickable", lv_indexClickable, "Type", 1))
// L746
BankValueSetFromInt(lv_storyBank, lv__SectionName, (lv_indexClickable), BoolToInt(libVCST_gf_PS_ClickableIsNew(lv_indexClickable)))
// L990
BankValueSetFromInt(BankLastCreated(), lv__SectionName, "CurrentRoom", (libVCST_gv_pS_CurrentRoom))

# mods/challenges.sc2mod

LibChal.galaxy

// L1866
BankValueSetFromInt(libChal_gv_cHL_DefaultChallengeBank, libChal_gf_ChallengeName(lp_challengeType), libChal_gv_cHLC_KEYAWARD, (lp_award))

# mods/heroesdata.stormmod

GameLib.galaxy

// L12653
BankValueSetFromInt(libGame_gv_players[lv_itPlayer].lv_bankData.lv_bank, "MapPlayCounts", libCore_gv_mAPMapStringID, libGame_gv_players[lv_itPlayer].lv_bankData.lv_mapPlayCount)

# mods/heroesdata.stormmod

StartingExperienceLib.galaxy

// L1367
BankValueSetFromInt(libGame_gv_players[libStEx_gv_sE_Player].lv_bankData.lv_bank, libStEx_gv_sE_TrainingModeBankSection_C, lv_bankKey, libStEx_gv_sE_TrainingModeTips[(lp_tip)].lv_doneTimes)
// L2476
BankValueSetFromInt(libGame_gv_players[libStEx_gv_sE_Player].lv_bankData.lv_bank, libStEx_gv_sE_TrainingModeBankSection_C, lv_bankKey, libStEx_gv_sE_TrainingModeRefCardTimes)
// L2497
BankValueSetFromInt(libGame_gv_players[libStEx_gv_sE_Player].lv_bankData.lv_bank, libStEx_gv_sE_TrainingModeBankSection_C, lv_bankKey, libStEx_gv_sE_TrainingModeTips[lv_itNewUserTip].lv_doneTimes)
// L2843
BankValueSetFromInt(libGame_gv_players[libStEx_gv_sE_Player].lv_bankData.lv_bank, libStEx_gv_sE_TrainingModeBankSection_C, lv_bankKey, libStEx_gv_sE_TrainingModeRefCardTimes)

# mods/heroesdata.stormmod

UILib.galaxy

// L2027
BankValueSetFromInt(lv_localBank, "Debug Menu Options", "HeroIndex", DialogControlGetSelectedItem(libUIUI_gv_uIDebugPanel.lv_heroDropdown, 1))
// L2028
BankValueSetFromInt(lv_localBank, "Debug Menu Options", "SkinIndex", DialogControlGetSelectedItem(libUIUI_gv_uIDebugPanel.lv_skinDropdown, 1))
// L2029
BankValueSetFromInt(lv_localBank, "Debug Menu Options", "MountIndex", DialogControlGetSelectedItem(libUIUI_gv_uIDebugPanel.lv_mountTypeDropdown, 1))
// L2030
BankValueSetFromInt(lv_localBank, "Debug Menu Options", "MountVariation", DialogControlGetSelectedItem(libUIUI_gv_uIDebugPanel.lv_mountVariationDropdown, 1))
// L2031
BankValueSetFromInt(lv_localBank, "Debug Menu Options", "TrueHeroIndex", DialogControlGetSelectedItem(libUIUI_gv_uIDebugPanel.lv_heroDropdown, 1))
// L2032
BankValueSetFromInt(lv_localBank, "Debug Menu Options", "TrueSkinIndex", libCore_gf_DataSkinsGetSkinIndexFromSkinLink((DataTableGetString(true, ("HeroIndex_" + IntToString(DialogControlGetSelectedItem(libUIUI_gv_uIDebugPanel.lv_heroDropdown, 1)) + "_SkinIndex_" + IntToString(DialogControlGetSelectedItem(libUIUI_gv_uIDebugPanel.lv_skinDropdown, 1)))))))

# mods/missionpacks/campaigncommon.sc2mod

LibComC.galaxy

// L3882
BankValueSetFromInt(lp_bank, lp_section, lp_key, lp_value)

# mods/missionpacks/novacampaign.sc2mod

LibNCST.galaxy

// L657
BankValueSetFromInt(lv_storyBank, lv__SectionName, (lv_indexClickable), UserDataGetInt("Clickable", lv_indexClickable, "Type", 1))
// L659
BankValueSetFromInt(lv_storyBank, lv__SectionName, (lv_indexClickable), BoolToInt(libNCST_gf_NS_ClickableIsNew(lv_indexClickable)))
// L891
BankValueSetFromInt(BankLastCreated(), lv__SectionName, "CurrentRoom", (libNCST_gv_nS_CurrentRoom))

# mods/starcoop/starcoop.sc2mod

LibCOOC.galaxy

// L4842
BankValueSetFromInt(lp_bank, lp_section, lp_key, lp_value)

# mods/voidprologue.sc2mod

LibA3DDD02B.galaxy

// L6781
BankValueSetFromInt(lp_bank, lp_section, lp_key, lp_value)