![]() |
Bank - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17) +---- Thread: Bank (/showthread.php?tid=2051) |
Bank - DarkX - 02-09-2008 Ok I fixed the majority of a code and based the fixes off of Robin's code but I can not seem to get it to completely function, it makes the Bank folder and sets everything up for the system but it will not save the players bank within the bank folder, and here seems to be why but I can't figure out how to fix it and I have tried about every way I can think of Ok first off in packet 'Login' it highlights .Bank and gives the error message "method or data member not found" Code: If FileExist("banks\" & Trim(Name) & ".ini") = False Then Code: For n = 1 To MAX_BANK Code: for n = 1 to max_bank Code: If FileExist("banks\" & Trim(Name) & ".ini") = False Then Re: Bank - Matt - 02-09-2008 Code: If FileExist("\banks\" & Trim(Name) & ".ini") = False Then Or.. Code: If FileExist(app.path & "\banks\" & Trim(Name) & ".ini") = False Then Re: Bank - DarkX - 02-09-2008 So try with another \ or create the app.path is what your saying? Re: Bank - Matt - 02-09-2008 DarkX Wrote:So try with another \ or create the app.path is what your saying? Yeah, I'm not 100%, cause I don't have the fileexist function in front of me, but those would be my guesses. Re: Bank - DarkX - 02-09-2008 Ok well here's the one from sub saveplayer with some moding to it Code: FileName = App.Path & "\Accounts\" & Trim(player(index).Name) & Trim(Player(Index).Login) & ".ini" Re: Bank - Matt - 02-09-2008 DarkX Wrote:Ok well here's the one from sub saveplayer with some moding to it I would need an example of another if fileexist statement to tell you. Though, I'm pretty sure it's the second one. Re: Bank - DarkX - 02-09-2008 I think that is possibly the right way(number 2), I will try it when I get home later tonight and let you know how it works out. Re: Bank - DarkX - 03-09-2008 Ok I realise that I am double posting and I am sorry for that, but... I hate this f-n code I'm working with, I chaged the app.path to be as if it were in another save system but that did not work, it still issues the same error. as I said when I made the post in the first place I have tried everything that I am familiar with, and Perfekt's Idea. No solution yet. Thanks for any help Re: Bank - Robin - 06-09-2008 Obviously not, hence the lack of posts. If you can't sort your bank system out, re-do it from scratch and this time plan it out first. Re: Bank - DarkX - 06-09-2008 I have started to re-do it, from the basics of the Inventory system, adding a deposit and withdraw system, which are sort of acting as the pickup item and dropitem code, then modifing it to have a actual defined system to Identify that the bank has the item. Which is going to take me a little longer, but if it works it'll be good(And I think I figured out what I did wrong with the other one.) Since I had made the code to where the Bank was actually stored within the players account like the inventory, example: Code: player Code: If FileExist("banks\" & Trim(Name) & ".ini") = False Then Code: bank(1 to MAX_BANK) as BankRec Code: bank(1 to MAX_BANK) as BankRec Re: Bank - Saturate - 18-09-2008 So X you figured out this code? Your signiture says so, mind sharing some basics? Re: Bank - DarkX - 18-09-2008 Yeah, but it is not compatible with MSE build 1 or above, so if you want to use it. I might share and you can have fun... Trying to make it work on MSE but that damned .Bank thing does not wanna work. which is causing alot of issues towards me making a tutorial. And if I give it to you it's straight code so you have to figure out where it goes on your own. by the way, I removed the saving in a seperate folder, in {playername}.ini, it saves to the characters .ini just like the inventory, so it's like call save player Code: [char1] Re: Bank - Nean - 19-09-2008 I don't suppose anyone feels like making a MS4 bank tut, or possibly explaining in-depth how to do it? I'd really like to get one/make one, but I'm far too inexperienced. Re: Bank - Robin - 19-09-2008 I'll add a client-side part to mine when I get some free time. Re: Bank - DarkX - 19-09-2008 I found out why the other one was not working, I had to remove the check if fileexist and putvars from the login packet and it's working pretty nicely now, just it for some odd reason saves the entire char stat set in the banks, it's like having a back up character. Re: Bank - Nean - 19-09-2008 Robin Wrote:I'll add a client-side part to mine when I get some free time. Alright sounds great. Thanks. Re: Bank - Rian - 19-09-2008 I just wanted to let you guys know that you should consider converting your player accounts to binary. Having that much data stored in a .INI file is gonna make it huge, which means you'll likely experience server lag when a lot of players are online and the server saves. It'll probably also lag when players leave the game. Re: Bank - Robin - 20-09-2008 Saving it in the player's .ini file is stupid anyway. Just store it in a separate file, as .dat. Like I did ![]() |