• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Bank appending instead of overwrite?

Status
Not open for further replies.
Level 9
Joined
Sep 28, 2004
Messages
365
I have an example here:
  • Bank
    • Events
      • UI - Player Any Player presses 1 (Key) key Down with shift Allow, control Allow, alt Allow
    • Local Variables
      • Exp = 50 <Integer>
    • Conditions
    • Actions
      • Bank - Open bank "testBank" for player 1
      • Bank - Store integer Exp as "expariance" of section "Hero" in bank (Last opened bank)
      • Bank - Save bank (Last opened bank)
Notice i spell the key "expariance" wrongly..
1. now i test the map
2. press 1
3. close
4. check the bank file with notepad, and notice it will have
Code:
<Bank version="1">
    <Section name="Hero">
        <Key name="expariance">
            <Value int="50"/>
        </Key>
    </Section>
</Bank>

Now if i change the key again to "experience" for the sake of spelling it correctly..
1. test the map
2. press 1
3. close
4. open the bank with notepad
Code:
<Bank version="1">
    <Section name="Hero">
        <Key name="expariance">
            <Value int="50"/>
        </Key>
        <Key name="experience">
            <Value int="50"/>
        </Key>
    </Section>
</Bank>

This isn't anything serious... but is there other way to fix this other than removing the extra key manually with notepad? Or am i doing it wrongly?
 
Just delete the bank. As you are a map developer it does not mater if you delete it fom time to time due to changing your scripting directions during the creation of your map.

It is only a problem if you release an update to your map with changes like this, in which case you will need to add code specifically to remove broken entries.
 
Thanks for all the reply. I guess that is the only solution to check carefully like what Dr Super Good said. and plan/organise everything before starting.

The only thing bad about this is unnecessary things in the bank file. It might not be a big problem but when it gets huge, like the 80 limit, it will screw things up.
 
Status
Not open for further replies.
Back
Top