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.
[2024-5-06. : 5:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[2024-5-06. : 5:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[2024-5-06. : 5:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
[2024-5-06. : 3:04 am]
Ultraviolet -- Vrael
Vrael shouted: I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
With the modern EUD editors, I don't think they're calculating nearly as many offsets as you might imagine. Still some fancy ass work that I'm sure took a ton of effort
[2024-5-06. : 12:51 am]
Oh_Man -- definitely EUD
[2024-5-05. : 9:35 pm]
Vrael -- I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
[2024-5-05. : 9:35 pm]
Vrael -- that is insane
[2024-5-05. : 9:35 pm]
Vrael -- damn is that all EUD effects?
[2024-5-04. : 10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
[2024-5-04. : 1:05 am]
Vrael -- I won't stand for people going around saying things like im not a total madman
Please log in to shout.


Members Online: Oh_Man