stringbefore;stringafter;bankprogressBank=BankLoad("test",1);//Load bankbefore=BankValueGetAsString(progressBank,"a","b");//Check if "c" is thereBankValueSetFromString(progressBank,"a","b","c");//Add cafter=BankValueGetAsString(progressBank,"a","b");//Check resultBankSave(progressBank);//Save to diskTriggerDebugOutput(1,StringToText("Before:"+before+" After:"+after),true);//Always displayes only the second c
It is embedded in a custom script init function. The last line (the debug output) shows up, so the code gets executed. I load a bank, add a value to it and save it. If I run this map twice, the value should be in the bank even before I add it (since the bank was saved). However, it isn't! The debug output always shows only the second c. In addition, no bank file gets created in the banks directory.
So what am I doing wrong? Are there any restriction on banks, like they cannot be created during map init?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi,
I have this galaxy code:
It is embedded in a custom script init function. The last line (the debug output) shows up, so the code gets executed. I load a bank, add a value to it and save it. If I run this map twice, the value should be in the bank even before I add it (since the bank was saved). However, it isn't! The debug output always shows only the second c. In addition, no bank file gets created in the banks directory.
So what am I doing wrong? Are there any restriction on banks, like they cannot be created during map init?