Staredit Network > Forums > SC2 Assistance > Topic: Breaking the Bank
Breaking the Bank
Jan 4 2012, 9:50 pm
By: Bolshevik09  

Jan 4 2012, 9:50 pm Bolshevik09 Post #1



Quote
"You can't use variables for the bank name or the player number because variables aren't even initialized when that code is called" - http://www.galaxywiki.net/Banks

What does this mean exactly, I'm having a few problems with banks storing integers and texts. The bank can store Booleans just fine but cant seem to recall integers or texts. I have the Key and section matched perfectly or my triggers are just mixed up..
But i use a "for each integer" action to restore my banks as following

For each integer counter from 1 to 3 with increment 1, do (Actions)
General - If (Conditions) then do (Actions) else do (Actions)
If
(Load ("SaveState" + (String(counter))) of section "Boolean" from bank MoonShinesDat as boolean) == True
Then
Variable - Set GameTime Seconds[counter] = (Load "TotalTime" of section "Integer" from bank MoonSave[counter] as integer value)
Variable - Set Coinage[counter] = (Load "Coinage" of section "Integer" from bank MoonSave[counter] as integer value)
Variable - Set TotalXP[counter] = (Load "TotalXP" of section "Integer" from bank MoonSave[counter] as integer value)
Else

Where i have "MoonSave" as 3 different save files accordingly to if they exist in "MoonShinesDat"
Does it matter if my variable "Coinage" is the same as the "Coinage" key from my bank?



None.

Jan 4 2012, 10:05 pm Bolshevik09 Post #2



Well crap i just solved my own problem, realized i was recalling from "MoonSave[counter]" but i forgot to save that bank as a variable!
Still would like to know what WIKI is saying



None.

Jan 4 2012, 11:08 pm Ahli Post #3

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

It's a terrible description of: You can't use variables in preload bank names. The name must be typed out.

Also, I might just throw a bank example. It just shows the important functions with some comments and I did a copy bank content (except for saved units).

Attachments:
bankTest.SC2Map
Hits: 1 Size: 14.66kb




Jan 5 2012, 10:14 pm Bolshevik09 Post #4



Quote from Ahli
I might just throw a bank example. It just shows the important functions with some comments

Great Example Map

Post has been edited 3 time(s), last time on Jan 5 2012, 10:36 pm by Bolshevik09. Reason: Stupid question, Deleted



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:08 pm]
Oh_Man -- example of wat u mean?
[05:59 am]
NudeRaider -- *is
[05:17 am]
NudeRaider -- despite all its flaws the sound design its fantastic
[10:29 pm]
Oh_Man -- homeworld 3 = massive disappointment
[2024-5-14. : 10:05 am]
Moose -- ya
[2024-5-14. : 5:23 am]
zsnakezz -- yes
[2024-5-12. : 8:51 pm]
l)ark_ssj9kevin -- Are you excited for Homeworld 3?
[2024-5-12. : 8:44 pm]
l)ark_ssj9kevin -- Hi Brusilov
[2024-5-12. : 4:35 pm]
O)FaRTy1billion[MM] -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
my server that was hosting it died
[2024-5-10. : 8:46 pm]
NudeRaider -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
https://armoha.github.io/eud-book/
Please log in to shout.


Members Online: 9avac76100fh0, Oh_Man, Roy