• 0

    posted a message on unable to open banks through customscript

    Yes, I tried them multiple times, and the first one works even after restarting, the second doesn't at all. My solution is to open and save the banks like this:

    Edit:

    Eh, I don't really know what I've changed, but running everything as a custom script from the map init function works too, even with variables for bank name and player number.

    void create_banks () {
        int player;
        
        player = 0;
        while (player < players) {
            BankLoad(bank_name, player+1);
            highscore_bank[player] = BankLastCreated();
            old_highscore[player] = BankValueGetAsInt(highscore_bank[player], bank_section, bank_key_highscore);
            player += 1;
        }
    }
    

    I must've run another BankLoad function through the "Initialization Function (Optional):"-thingy before or something.

    Posted in: Miscellaneous Development
  • 0

    posted a message on unable to open banks through customscript

    When I try to read a saved variable (interger in this case) after having opened the bank through BankLoad() in custom script, I get nothing. Even though the file is there. Recompiling the map and instead opening the bank like in the first picture works however.

    This works

    working

    while this doesn't

    not working

    Looking at the script, the whole code is EXACTLY the same, still one works and the other doesn't. Could someone please confirm or explain this?

    Also, using a variable (const string) for bank name or player number gives the same error.

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