[BETA] Bank

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
_SMOOTH_
Registered User
Posts: 18
Joined: Thu Aug 28, 2003 1:17 am

Post by _SMOOTH_ » Tue Sep 02, 2003 5:09 pm

Hey peoples,

After I installed this mod I got an error:

Warning: Division by zero in /home/charles/public_html/phpbb/bank.php on line 69

Warning: Cannot modify header information - headers already sent by (output started at /home/charles/public_html/phpbb/bank.php:69) in /home/charles/public_html/phpbb/bank.php on line 81

Warning: Cannot modify header information - headers already sent by (output started at /home/charles/public_html/phpbb/bank.php:69) in /home/charles/public_html/phpbb/includes/page_header.php on line 476

Warning: Cannot modify header information - headers already sent by (output started at /home/charles/public_html/phpbb/bank.php:69) in /home/charles/public_html/phpbb/includes/page_header.php on line 478

Warning: Cannot modify header information - headers already sent by (output started at /home/charles/public_html/phpbb/bank.php:69) in /home/charles/public_html/phpbb/includes/page_header.php on line 479


Can someone tell me how to fix this error?

_SMOOTH_
Registered User
Posts: 18
Joined: Thu Aug 28, 2003 1:17 am

Post by _SMOOTH_ » Tue Sep 02, 2003 8:22 pm

Ok..for those of you who ever got the error in my last post...go back to your bank config page and set the interest payment time to at least "1"...then you won't get the divid by zero error.....thnx

McLR
Registered User
Posts: 95
Joined: Thu Aug 21, 2003 12:51 pm

Post by McLR » Tue Sep 02, 2003 8:23 pm


Earthk
Registered User
Posts: 19
Joined: Wed Aug 13, 2003 7:21 am

Post by Earthk » Sun Sep 14, 2003 9:10 am

_SMOOTH_ wrote: Hey peoples,

After I installed this mod I got an error:

Warning: Division by zero in /home/charles/public_html/phpbb/bank.php on line 69

Warning: Cannot modify header information - headers already sent by (output started at /home/charles/public_html/phpbb/bank.php:69) in /home/charles/public_html/phpbb/bank.php on line 81

Warning: Cannot modify header information - headers already sent by (output started at /home/charles/public_html/phpbb/bank.php:69) in /home/charles/public_html/phpbb/includes/page_header.php on line 476

Warning: Cannot modify header information - headers already sent by (output started at /home/charles/public_html/phpbb/bank.php:69) in /home/charles/public_html/phpbb/includes/page_header.php on line 478

Warning: Cannot modify header information - headers already sent by (output started at /home/charles/public_html/phpbb/bank.php:69) in /home/charles/public_html/phpbb/includes/page_header.php on line 479


Can someone tell me how to fix this error?


I got the same errors and after changing the interest payment time to
86400, it works for a transaction and then the errors returns again. :(

User avatar
naderman
Consultant
Consultant
Posts: 3735
Joined: Fri Aug 01, 2003 10:06 pm
Location: Berlin, Germany
Name: Nils Adermann
Contact:

Post by naderman » Sun Sep 14, 2003 9:22 am

I had the same error. after I tried a few things, I found out that this works:
Find

Code: Select all

$interesttime = ($restockntime - $board_config['banklastrestocked']); 
        $interesttime = $interesttime/ $board_config['bankpayouttime'];
Replace with

Code: Select all

$interesttime = ($restockntime - $board_config['banklastrestocked']) / $board_config['bankpayouttime'];
        //$interesttime = $interesttime;
I appreciate gifts from my Amazon wishlist.
naderman.de twitter: @naderman

Earthk
Registered User
Posts: 19
Joined: Wed Aug 13, 2003 7:21 am

Post by Earthk » Sun Sep 14, 2003 11:12 am

Thanks naderman, your suggestion works :)

Zarath
Registered User
Posts: 736
Joined: Fri Dec 06, 2002 9:01 am
Contact:

Post by Zarath » Mon Sep 15, 2003 3:14 am

Heh, that was a really stupid change to make. I urge you to change it back.

That error only appears when you have your payout time set to 0. If it's set to 0 people are going to get interest _EVERY_ time they visit the bank.



Zarath

User avatar
naderman
Consultant
Consultant
Posts: 3735
Joined: Fri Aug 01, 2003 10:06 pm
Location: Berlin, Germany
Name: Nils Adermann
Contact:

Post by naderman » Mon Sep 15, 2003 7:13 am

well that can't be true. all it does is this:
your code:
c = (a-b)
c = c/d

that's the same as
c = (a-b)/d
I appreciate gifts from my Amazon wishlist.
naderman.de twitter: @naderman

ekin_116
Registered User
Posts: 57
Joined: Mon Sep 15, 2003 8:48 am
Location: Philippines
Contact:

Post by ekin_116 » Mon Sep 15, 2003 8:52 am

Is this Bank Mod works fine with Cash Mod?
Need to change any code?

Zarath
Registered User
Posts: 736
Joined: Fri Dec 06, 2002 9:01 am
Contact:

Post by Zarath » Mon Sep 15, 2003 5:06 pm

You're right, I didn't read it properly... but it won't fix that error. Soon as it tries to devide by the payout time of 0 in any forumla it will cause an error.

Yes it works with the cash mod if you name your currency user_points.

Zarath

User avatar
naderman
Consultant
Consultant
Posts: 3735
Joined: Fri Aug 01, 2003 10:06 pm
Location: Berlin, Germany
Name: Nils Adermann
Contact:

Post by naderman » Mon Sep 15, 2003 6:16 pm

Yeah maybe you're right. I saw that error, made the interest time more then 0 and fixed it and then I looked at the Bank again. So maybe that won't fix it, but it makes it mor understandable I think.
I appreciate gifts from my Amazon wishlist.
naderman.de twitter: @naderman

User avatar
rickhaye
Registered User
Posts: 107
Joined: Fri Feb 14, 2003 7:38 pm
Contact:

Post by rickhaye » Sun Sep 28, 2003 1:23 am

Is there an addon for the bank mod to record transactions like deposits, withdrawals and opening of accounts that will work with the cash mod ?

NiVRaM
Registered User
Posts: 33
Joined: Tue Jul 08, 2003 5:55 pm
Location: Virginia
Contact:

Post by NiVRaM » Sun Oct 12, 2003 3:12 pm

Hi, sorry if you've answered this before.. but I'm unsure. Does this mod work with 2.0.6, or only 2.0.5 (it says 2.0.5 in the phpbb hacks page, so i was confused.)

Also, what version does lottery work with? (it says 2.0.3 on phpbbhacks, and I thought that was a bit odd...)

Thanks
"Knowledge is just opinion you trust enough to act upon." -Orson Scott Card

User avatar
thewizard
Registered User
Posts: 356
Joined: Sun Sep 29, 2002 7:46 am

Post by thewizard » Sun Oct 12, 2003 3:33 pm

the bank will work with 2.0.6 however i am unsure as for the lottery mod.

Out of curiosity anyone able to edit the current bank or start a new one that supports multiple currencies with the cash mod?

AbelaJohnB
Former Team Member
Posts: 5674
Joined: Fri Jul 06, 2001 11:56 pm

Post by AbelaJohnB » Wed Oct 15, 2003 7:34 am

Due to recent changes in our policy to not allow Non-DBAL Compliant MOD's to be listed here @phpBB, (see here for details) this thread is being locked down and all download links removed.

To the author of this MOD: Once/when/if you have completed the upgrade to use the phpBB DBAL, and your MOD conforms to all the standard MOD Template standards, please send me (AbelaJohnB) a PM for reviewing your updated code and further directions to continue the development of your MOD here @phpBB.Com


Thank You.
AbelaJohnB
phpBB MOD Team Leader

Locked

Return to “[2.0.x] MODs in Development”