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.
[08:08 pm]
anoeth47 -- Can I get a moderator/lord of the forum to clean up my topics - delete posts not really part of the topic.
[07:11 pm]
anoeth47 -- Can you download from forum if not a member?
[07:07 pm]
anoeth47 -- Thank you NudeRaider much cleaner
[04:24 am]
anoeth47 -- Sie_Sayoka >>> Thanks!!! Got the png's to show up in Map Showcase
[2026-4-22. : 10:20 pm]
anoeth47 -- Sweet
[2026-4-22. : 7:48 pm]
NudeRaider -- https://staredit.net/381642/ really makes you appreciate (again) how good sc music is.
[2026-4-18. : 3:57 am]
NudeRaider -- https://staredit.net/381600/ You have 5 minutes, then you can only edit your posts.
[2026-4-17. : 4:05 pm]
NudeRaider -- DarkenedFantasies
DarkenedFantasies shouted: you eat lots of beans
:lol:
Please log in to shout.


Members Online: Vrael, Dem0n