# Store Text
Grammar — Store text value as key of section section in bank bank
Flags —Native
|Action
Stores a Text 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
— Bankstring
— Sectionstring
— Keytext
— Value
Returns — void
native void BankValueSetFromText(
bank b,
string section,
string key,
text value,
);
# Related
Category: [Bank / Store & Load](/galaxy/reference#bank-store &-load)
- Store Boolean —
void
— BankValueSetFromFlag - Store Integer —
void
— BankValueSetFromInt - Store Point —
void
— BankValueSetFromPoint - Store Real —
void
— BankValueSetFromFixed - Store String —
void
— BankValueSetFromString - Store Text —
void
— BankValueSetFromText - Store Unit —
void
— BankValueSetFromUnit - Load Boolean Value —
bool
— BankValueGetAsFlag - Load Integer Value —
int
— BankValueGetAsInt - Load Point Value —
point
— BankValueGetAsPoint - Load Real Value —
fixed
— BankValueGetAsFixed - Load String Value —
string
— BankValueGetAsString - Load Text Value —
text
— BankValueGetAsText - Restore Unit —
unit
— BankValueGetAsUnit - Last Restored Unit —
unit
— BankLastRestoredUnit
# Examples
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:9327
lv_index = 1;
for ( ; ( (auto2473C567_ai >= 0 && lv_index <= auto2473C567_ae) || (auto2473C567_ai < 0 && lv_index >= auto2473C567_ae) ) ; lv_index += auto2473C567_ai ) {
BankValueSetFromText(lp_targetBank, lv__SectionName, (IntToString(lv_index) + "_1"), libCamp_gv_tSX_Tutorial_HistoryTitle[lv_index]);
BankValueSetFromText(lp_targetBank, lv__SectionName, (IntToString(lv_index) + "_2"), libCamp_gv_tSX_Tutorial_HistoryDescription[lv_index]);
BankValueSetFromString(lp_targetBank, lv__SectionName, (IntToString(lv_index) + "_3"), libCamp_gf_TS_Tutorial_ConvertImageToString(libCamp_gv_tSX_Tutorial_HistoryIcon[lv_index]));
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:9328
for ( ; ( (auto2473C567_ai >= 0 && lv_index <= auto2473C567_ae) || (auto2473C567_ai < 0 && lv_index >= auto2473C567_ae) ) ; lv_index += auto2473C567_ai ) {
BankValueSetFromText(lp_targetBank, lv__SectionName, (IntToString(lv_index) + "_1"), libCamp_gv_tSX_Tutorial_HistoryTitle[lv_index]);
BankValueSetFromText(lp_targetBank, lv__SectionName, (IntToString(lv_index) + "_2"), libCamp_gv_tSX_Tutorial_HistoryDescription[lv_index]);
BankValueSetFromString(lp_targetBank, lv__SectionName, (IntToString(lv_index) + "_3"), libCamp_gf_TS_Tutorial_ConvertImageToString(libCamp_gv_tSX_Tutorial_HistoryIcon[lv_index]));
BankValueSetFromString(lp_targetBank, lv__SectionName, (IntToString(lv_index) + "_4"), libCamp_gf_TS_Tutorial_ConvertMovieToString(libCamp_gv_tSX_Tutorial_HistoryMovie[lv_index]));