so for SC2BW i redesigned the rating system i implemented, which uses banks.
it used to work fine.
but now im having an issue where 75% of the time it does not load values from the bank at all
cannot work out why. i have tried delays. i've read all other threads on this subject including onetwo's
as i write this however im currently testing disabling the "preload bank" action and remembered reading something about it causing an issue like this?
*EDIT*
preload bank is not causing it, my second idea is i am compressing the string, maybe that?
anyone have anymore information or experience with this problem?
lLoadBank
Options: Action
Return Type: (None)
Parameters
Player = 0 <Integer>
Grammar Text: lLoadBank(Player)
Hint Text: (None)
Custom Script Code
Local Variables
Actions
Bank - Open bank LadderRecord.BankName for player Player
Variable - Set LadderRecord.PlayerBanks[Player] = (Last opened bank)
lLoadLadderStats(Player)
lLoadMatchupStats(Player)
lLoadLadderStats
Options: Action
Return Type: (None)
Parameters
Player = 0 <Integer>
Grammar Text: lLoadLadderStats(Player)
Hint Text: (None)
Custom Script Code
Local Variables
Decrypt = "" <String>
n = 3 <Integer>
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(lCheck Game Mode()) == 1
Then
Variable - Set Decrypt = (Load key "HCStats" of section "Ladder" from bank LadderRecord.PlayerBanks[Player] as a String)
Else
Variable - Set Decrypt = (Load key "Stats" of section "Ladder" from bank LadderRecord.PlayerBanks[Player] as a String)
Variable - Set Decrypt = (<Starcode> Decrypt String(Decrypt, LadderRecord.EncryptKey
Variable - Set Decrypt = (<Starcode> Decompress String(Decrypt))
<Starcode> Set Code(Decrypt)
General - Repeat (Actions) 3 times
Actions
Variable - Set LadderRecord.PlayerPoints[Player][n] = (<Starcode> Get Integer Value(20000))
Variable - Set LadderRecord.PlayerWins[Player][n] = (<Starcode> Get Integer Value(20000))
Variable - Set LadderRecord.PlayerLosses[Player][n] = (<Starcode> Get Integer Value(20000))
Variable - Modify n: - 1
lCheckPlayerPointsNotBelowThreshold(Player)
lLoadMatchupStats
Options: Action
Return Type: (None)
Parameters
Player = 0 <Integer>
Grammar Text: lLoadMatchupStats(Player)
Hint Text: (None)
Custom Script Code
Local Variables
Decrypt = "" <String>
n = 3 <Integer>
i = 3 <Integer>
p = 2 <Integer>
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(lCheck Game Mode()) == 1
Then
Variable - Set Decrypt = (Load key "HCMatchupStats" of section "Ladder" from bank LadderRecord.PlayerBanks[Player] as a String)
Else
Variable - Set Decrypt = (Load key "MatchupStats" of section "Ladder" from bank LadderRecord.PlayerBanks[Player] as a String)
Variable - Set Decrypt = (<Starcode> Decrypt String(Decrypt, LadderRecord.EncryptKey
Variable - Set Decrypt = (<Starcode> Decompress String(Decrypt))
<Starcode> Set Code(Decrypt)
General - Repeat (Actions) 3 times
Actions
General - Repeat (Actions) 3 times
Actions
General - Repeat (Actions) 2 times
Actions
Variable - Set LadderRecord.PlayerMatchupStats[Player][n][i][p] = (<Starcode> Get Integer Value(20000))
Variable - Modify p: - 1
Variable - Modify i: - 1
Variable - Set p = 2
Variable - Set i = 3
Variable - Set p = 2
Variable - Modify n: - 1
LadderInit
Events
Timer - Elapsed time is 5.0 Game Time seconds
Local Variables
Conditions
Actions
lSet Game Mode()
Bank - Preload and synchronize bank "Ladder" for player 1
Bank - Preload and synchronize bank "Ladder" for player 2
UI - Display ((Text(LadderRecord.Gamemode Name)) + " Rating") for (All players) to Subtitle area
lInit(1)
lInit(2)
sStatsInit()
Trigger - Turn Check Player Status On
Trigger - Turn osUpdateStats On
lInit
Options: Action, Create Thread
Return Type: (None)
Parameters
Player = 0 <Integer>
Grammar Text: lInit(Player)
Hint Text: (None)
Custom Script Code
Local Variables
Actions
lSetVariables()
lLoadBank(Player)
osLoadBankValues(Player)
lDisplayLadderRating(Player)
lSetInitialLose()
so whats it mean when it loads bank values fine in offline test map
but when i publish and try to load bank values online it loads nothing (it loads "0" for everything)
should probably mention all my triggers are run from a library housed in a mod file
Bank - Preload and synchronize bank "Ladder" for player 1
Bank - Open bank LadderRecord.BankName for player 1
Debug - Display (Text((Load "PlayerPoints1" of section "Ladder" from bank (Last opened bank) as integer value))) as debug output using Type 1, and Do display it in the game window
Debug - Display (Text((Load ("PlayerPoints" + (String(1))) of section "Ladder" from bank (Last opened bank) as integer value))) as debug output using Type 1, and Do display it in the game window
both debug messages return the integer 0
this is from the bank file.
so for SC2BW i redesigned the rating system i implemented, which uses banks.
it used to work fine.
but now im having an issue where 75% of the time it does not load values from the bank at all
cannot work out why. i have tried delays. i've read all other threads on this subject including onetwo's
as i write this however im currently testing disabling the "preload bank" action and remembered reading something about it causing an issue like this?
*EDIT*
preload bank is not causing it, my second idea is i am compressing the string, maybe that?
anyone have anymore information or experience with this problem?
lLoadBank
Options: Action
Return Type: (None)
Parameters
Player = 0 <Integer>
Grammar Text: lLoadBank(Player)
Hint Text: (None)
Custom Script Code
Local Variables
Actions
Bank - Open bank LadderRecord.BankName for player Player
Variable - Set LadderRecord.PlayerBanks[Player] = (Last opened bank)
lLoadLadderStats(Player)
lLoadMatchupStats(Player)
-----------------------------------------------------------------------------------------------------------------------------------------------------
lLoadLadderStats
Options: Action
Return Type: (None)
Parameters
Player = 0 <Integer>
Grammar Text: lLoadLadderStats(Player)
Hint Text: (None)
Custom Script Code
Local Variables
Decrypt = "" <String>
n = 3 <Integer>
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(lCheck Game Mode()) == 1
Then
Variable - Set Decrypt = (Load key "HCStats" of section "Ladder" from bank LadderRecord.PlayerBanks[Player] as a String)
Else
Variable - Set Decrypt = (Load key "Stats" of section "Ladder" from bank LadderRecord.PlayerBanks[Player] as a String)
Variable - Set Decrypt = (<Starcode> Decrypt String(Decrypt, LadderRecord.EncryptKey
Variable - Set Decrypt = (<Starcode> Decompress String(Decrypt))
<Starcode> Set Code(Decrypt)
General - Repeat (Actions) 3 times
Actions
Variable - Set LadderRecord.PlayerPoints[Player][n] = (<Starcode> Get Integer Value(20000))
Variable - Set LadderRecord.PlayerWins[Player][n] = (<Starcode> Get Integer Value(20000))
Variable - Set LadderRecord.PlayerLosses[Player][n] = (<Starcode> Get Integer Value(20000))
Variable - Modify n: - 1
lCheckPlayerPointsNotBelowThreshold(Player)
--------------------------------------------------------------------------------------------------------------------------------------------
lLoadMatchupStats
Options: Action
Return Type: (None)
Parameters
Player = 0 <Integer>
Grammar Text: lLoadMatchupStats(Player)
Hint Text: (None)
Custom Script Code
Local Variables
Decrypt = "" <String>
n = 3 <Integer>
i = 3 <Integer>
p = 2 <Integer>
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(lCheck Game Mode()) == 1
Then
Variable - Set Decrypt = (Load key "HCMatchupStats" of section "Ladder" from bank LadderRecord.PlayerBanks[Player] as a String)
Else
Variable - Set Decrypt = (Load key "MatchupStats" of section "Ladder" from bank LadderRecord.PlayerBanks[Player] as a String)
Variable - Set Decrypt = (<Starcode> Decrypt String(Decrypt, LadderRecord.EncryptKey
Variable - Set Decrypt = (<Starcode> Decompress String(Decrypt))
<Starcode> Set Code(Decrypt)
General - Repeat (Actions) 3 times
Actions
General - Repeat (Actions) 3 times
Actions
General - Repeat (Actions) 2 times
Actions
Variable - Set LadderRecord.PlayerMatchupStats[Player][n][i][p] = (<Starcode> Get Integer Value(20000))
Variable - Modify p: - 1
Variable - Modify i: - 1
Variable - Set p = 2
Variable - Set i = 3
Variable - Set p = 2
Variable - Modify n: - 1
where is your preload?
does it happen to specific player or rnd for every player?
add some debug text
LadderInit
Events
Timer - Elapsed time is 5.0 Game Time seconds
Local Variables
Conditions
Actions
lSet Game Mode()
Bank - Preload and synchronize bank "Ladder" for player 1
Bank - Preload and synchronize bank "Ladder" for player 2
UI - Display ((Text(LadderRecord.Gamemode Name)) + " Rating") for (All players) to Subtitle area
lInit(1)
lInit(2)
sStatsInit()
Trigger - Turn Check Player Status On
Trigger - Turn osUpdateStats On
lInit
Options: Action, Create Thread
Return Type: (None)
Parameters
Player = 0 <Integer>
Grammar Text: lInit(Player)
Hint Text: (None)
Custom Script Code
Local Variables
Actions
lSetVariables()
lLoadBank(Player)
osLoadBankValues(Player)
lDisplayLadderRating(Player)
lSetInitialLose()
so whats it mean when it loads bank values fine in offline test map
but when i publish and try to load bank values online it loads nothing (it loads "0" for everything)
should probably mention all my triggers are run from a library housed in a mod file
im completely confused
Bank - Preload and synchronize bank "Ladder" for player 1
Bank - Open bank LadderRecord.BankName for player 1
Debug - Display (Text((Load "PlayerPoints1" of section "Ladder" from bank (Last opened bank) as integer value))) as debug output using Type 1, and Do display it in the game window
Debug - Display (Text((Load ("PlayerPoints" + (String(1))) of section "Ladder" from bank (Last opened bank) as integer value))) as debug output using Type 1, and Do display it in the game window
both debug messages return the integer 0
this is from the bank file.
<?xml version="1.0" encoding="utf-8"?>
<Bank version="1">
<Section name="Ladder">
<Key name="PlayerPoints1">
<Value int="1000"/>
so i moved it from the trigger library and just into the map
...
......
...
it works
so much rage.
this makes it 100x harder to update my maps. sigh.