• 0

    posted a message on Player Banks Not Working

    Alright so I solved my problem. It turns out that I was opening a bank name that has an underscore ( ' _ ' ) in the name. I was looking at the actual bank file name and noticed it didn't have the underscore in it.

    So in my code, I just removed the underscore and it now works. :P Learned something new.

    Posted in: Triggers
  • 0

    posted a message on Player Banks Not Working

    My player banks are not working and I cannot figure out why. I have searched and searched, watched and read countless tutorials, and I still can not figure out why.

    These are my triggers:

    Initialization
        Events
            Game - Map initialization
        Local Variables
        Conditions
        Actions
            ------- Players
            Trigger - Run Player Initialization  ("Check Conditions, Don't Wait until it finishes")
    
    Player Initialization
        Events
        Local Variables
        Conditions
        Actions
            ------- Banks
            PlayerBanks PreloadBanks()
            PlayerBanks LoadHighScores()
    
    PlayerBanks PreloadBanks
        Options: Action
        Actions
            Bank - Preload and synchronize bank "MySaveName" for player 1
            Bank - Preload and synchronize bank "MySaveName" for player 2
            Bank - Preload and synchronize bank "MySaveName" for player 3
            Bank - Preload and synchronize bank "MySaveName" for player 4
            Bank - Preload and synchronize bank "MySaveName" for player 5
            Bank - Preload and synchronize bank "MySaveName" for player 6
            Bank - Preload and synchronize bank "MySaveName" for player 7
            Bank - Preload and synchronize bank "MySaveName" for player 8
            Bank - Preload and synchronize bank "MySaveName" for player 9
            Bank - Preload and synchronize bank "MySaveName" for player 10
            Bank - Preload and synchronize bank "MySaveName" for player 11
            Bank - Preload and synchronize bank "MySaveName" for player 12
    
    PlayerBanks LoadHighScores
        Options: Action
        Local Variables
            eachPlayer = 0 <Integer>
        Actions
            General - For each integer eachPlayer from 1 to 12 with increment 1, do (Actions)
                Actions
                    Bank - Open bank "MySaveName" for player eachPlayer
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            (Bank (Last opened bank) has "Highscore" in section "Statistics") == True
                        Then
                            Variable - Set HighScore[eachPlayer] = (Load "Highscore" of section "Statistics" from bank (Last opened bank) as integer value)
                            UI - Display "High Score Loaded. " for (Player group(eachPlayer)) to Subtitle area
                        Else
    
    PlayerBanks SaveHighScore
        Options: Action
        Parameters
            player = 0 <Integer>
        Local Variables
        Actions
            Bank - Open bank "MySaveName" for player player
            Bank - Store integer HighScore[player] as "Highscore" of section "Statistics" in bank (Last opened bank)
            Bank - Save bank (Last opened bank)
    

    Thanks for any help.

    Posted in: Triggers
  • To post a comment, please or register a new account.