Jump to content

[REL] Banking System 2.3


50p

Recommended Posts

Lol XetaQuake easily becomes somebody's fan ^^

:lol:

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 :wink: its possibly that the script still don´t save money? :lol: 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
  • Replies 152
  • Created
  • Last Reply

Top Posters In This Topic

Lol XetaQuake easily becomes somebody's fan ^^

:lol:

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 :wink: its possibly that the script still don´t save money? :lol: 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

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

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
_______________________________

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
_______________________________

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

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 by Guest
Link to comment

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 by Guest
Link to comment
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 xD

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
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 xD

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

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

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
  • 2 weeks later...

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

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
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
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...