XetaQuake Posted May 8, 2008 Share Posted May 8, 2008 Lol XetaQuake easily becomes somebody's fan ^^ It saves money to SQLite database which is included with MTA. It's not MySQL where you have to connect first. SQLite does not require any connection (as it's on the server itself). The database file is called 'registry.db' which is located in server's directory, you can open/edit it using SQLite Database Browser. Ah thanks, nice that the MTA team have includes a SQLite database I think i found a bug too its possibly that the script still don´t save money? And every time i restart the server it says "Creating new DB table bank_accounts". Have anybody else this bug, and @50p is that the bug you found too? Link to comment
XetaQuake Posted May 8, 2008 Share Posted May 8, 2008 Lol XetaQuake easily becomes somebody's fan ^^ It saves money to SQLite database which is included with MTA. It's not MySQL where you have to connect first. SQLite does not require any connection (as it's on the server itself). The database file is called 'registry.db' which is located in server's directory, you can open/edit it using SQLite Database Browser. Ah thanks, nice that the MTA team have includes a SQLite database I think i found a bug too its possibly that the script still don´t save money? And every time i restart the server it says "Creating new DB table bank_accounts". Have anybody else this bug, and @50p is that the bug you found too? Link to comment
50p Posted May 8, 2008 Author Share Posted May 8, 2008 Yes, but now it is fixed. It didn't save money because account in SQL was not created. Now it has been fixed and it's recommended to re-download the script. As said before, it saves money only for logged in players, so if you deposit some money not being logged in you'll lose the money when you log in or when you leave server. When you log in you'll be able to save the $. Also, it uses your registered account's name not your nickname, so you can have different nickname but the money still will be saved onto your account. The message "Creating new DB table bank_accounts" will always be shown because that's the way executeSQLCreateTable is made, but no worries it does not overwrite previously created table. It doesn't do anything when the table already exists. Link to comment
50p Posted May 8, 2008 Author Share Posted May 8, 2008 Yes, but now it is fixed. It didn't save money because account in SQL was not created. Now it has been fixed and it's recommended to re-download the script. As said before, it saves money only for logged in players, so if you deposit some money not being logged in you'll lose the money when you log in or when you leave server. When you log in you'll be able to save the $. Also, it uses your registered account's name not your nickname, so you can have different nickname but the money still will be saved onto your account. The message "Creating new DB table bank_accounts" will always be shown because that's the way executeSQLCreateTable is made, but no worries it does not overwrite previously created table. It doesn't do anything when the table already exists. Link to comment
XetaQuake Posted May 8, 2008 Share Posted May 8, 2008 i thank you so much! its works great now, and no errors, infos or warnings in debugscript thanks 50p, you created the first working and public bank script for MTA Link to comment
XetaQuake Posted May 8, 2008 Share Posted May 8, 2008 i thank you so much! its works great now, and no errors, infos or warnings in debugscript thanks 50p, you created the first working and public bank script for MTA Link to comment
[TTH]BiZkiT Posted May 9, 2008 Share Posted May 9, 2008 Jup works fine now thnx a lot Link to comment
[TTH]BiZkiT Posted May 9, 2008 Share Posted May 9, 2008 Jup works fine now thnx a lot Link to comment
[TTH]BiZkiT Posted May 10, 2008 Share Posted May 10, 2008 _______________________________I think I found a bug, but I won't tell you what it is as I want to see how long it will take you to find it, lol. I found it i think (You are not able to do) /deposit (amount) while in marker /withdraw (amount) does work ok Only problem (im not good scripter) how to fix it? Link to comment
[TTH]BiZkiT Posted May 10, 2008 Share Posted May 10, 2008 _______________________________I think I found a bug, but I won't tell you what it is as I want to see how long it will take you to find it, lol. I found it i think (You are not able to do) /deposit (amount) while in marker /withdraw (amount) does work ok Only problem (im not good scripter) how to fix it? Link to comment
50p Posted May 10, 2008 Author Share Posted May 10, 2008 (edited) Ok, thanks for the report. I appreciate it. The problem is that I check if user is registered and use player_mta_account which is nil. To fix it yourself: remove lines 122, 123 and the 'end' which closes the if statement (which should be at line 126 after 2 lines removed). Or re-download the script. Edited May 10, 2008 by Guest Link to comment
50p Posted May 10, 2008 Author Share Posted May 10, 2008 (edited) Ok, thanks for the report. I appreciate it. The problem is that I check if user is registered and use player_mta_account which is nil. To fix it yourself: remove lines 122, 123 and the 'end' which closes the if statement (which should be at line 126 after 2 lines removed). Or re-download the script. Edited May 10, 2008 by Guest Link to comment
XetaQuake Posted May 10, 2008 Share Posted May 10, 2008 today i found a bug too: when you a login in, you get the info how many money you have, right? every player can see it! thats not good because then the players see how many money you have Link to comment
XetaQuake Posted May 10, 2008 Share Posted May 10, 2008 today i found a bug too: when you a login in, you get the info how many money you have, right? every player can see it! thats not good because then the players see how many money you have Link to comment
50p Posted May 10, 2008 Author Share Posted May 10, 2008 today i found a bug too: when you a login in, you get the info how many money you have, right? every player can see it!thats not good because then the players see how many money you have I wish I've read this message before I uploaded v1.2. Ok, fixed. Re-download or replace line 96: outputChatBox( "Bank balance: $ " .. tostring( playersAccount[ source ].balance ) ) with this: outputChatBox( "Bank balance: $ " .. tostring( playersAccount[ source ].balance ), source, 255, 255, 0 ) Link to comment
50p Posted May 10, 2008 Author Share Posted May 10, 2008 today i found a bug too: when you a login in, you get the info how many money you have, right? every player can see it!thats not good because then the players see how many money you have I wish I've read this message before I uploaded v1.2. Ok, fixed. Re-download or replace line 96: outputChatBox( "Bank balance: $ " .. tostring( playersAccount[ source ].balance ) ) with this: outputChatBox( "Bank balance: $ " .. tostring( playersAccount[ source ].balance ), source, 255, 255, 0 ) Link to comment
50p Posted May 11, 2008 Author Share Posted May 11, 2008 Update (v1.3)! For more info go to the download page or the first post! EDIT: Update (v1.3.1)! There was a problem with depositing negative amount of money. It's recommended to re-download if you don't want your players to be rich! Link to comment
50p Posted May 11, 2008 Author Share Posted May 11, 2008 Update (v1.3)! For more info go to the download page or the first post! EDIT: Update (v1.3.1)! There was a problem with depositing negative amount of money. It's recommended to re-download if you don't want your players to be rich! Link to comment
Guest Posted May 25, 2008 Share Posted May 25, 2008 ok here is my problem. after starting the bank system needs restarting after each player join the error comes up attempt to compair boolean. but once the bank is restarted it functions for all players currently on the server and a new player joins and I get the same thing all over again. any clues? Link to comment
Guest Posted May 25, 2008 Share Posted May 25, 2008 ok here is my problem. after starting the bank system needs restarting after each player join the error comes up attempt to compair boolean. but once the bank is restarted it functions for all players currently on the server and a new player joins and I get the same thing all over again. any clues? Link to comment
50p Posted May 25, 2008 Author Share Posted May 25, 2008 Can you please give me the error and the line that happens? It will help a lot. Link to comment
50p Posted May 25, 2008 Author Share Posted May 25, 2008 Can you please give me the error and the line that happens? It will help a lot. Link to comment
Guest Posted May 27, 2008 Share Posted May 27, 2008 Can you please give me the error and the line that happens? It will help a lot. bank.script.server.lua:85: atempt to index field '?' (a nil value) this error is when login occurs bank.script.server.lua:51: attempt to index field '?' (a nil value) on logout. Link to comment
Recommended Posts