MyBB-Plugins Forums

Full Version: NewPoints plugin for Game Section RC3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
Any status on the new update?
Sorry about (earlier) posting this in the wrong thread, it's a Newpoints plugin (minor) bug.
http://forums.mybb-plugins.com/Thread-My...2#pid41462
(06-07-2010, 01:41 PM)Winford F. Wrote: [ -> ]Any status on the new update?

No.
@Seeker what's the problem? Don't have time to read that post now
Help.

I cannot download.

shows this message.

You do not have permission to access this page. This could be because of one of the following reasons:
Your account has either been suspended or you have been banned from accessing this resource.
You do not have permission to access this page. Are you trying to access administrative pages or a resource that you shouldn't be? Check in the forum rules that you are allowed to perform this action.
Your account may still be awaiting activation or moderation. (Resend Activation Code)

You are currently logged in with the username: 'Nettuno'
You must be a paid subscriber
>>> Quick version here:
Just goto games.php --> The amount of Newpoints displayed is adjusted + or - by the amount paid (or charged) for playing one game.
  • The database is not off, just the display number is wrong.

(06-08-2010, 06:14 AM)Pirata Nervo Wrote: [ -> ]@Seeker what's the problem? Don't have time to read that post now

Full details + temp. fix:

I found an odd bug, not too serious, please fix someday:
Actual Newpoints = My$2,000,000.00 (for example), w/ nice number formatting almost like real money. Smile
goto games.php
If (Number of points users earn or lose by playing a game = 0 )
Newpoints displayed = My$2,000,000.00 = No problem

If (Number of points users earn or lose by playing a game = 100 )
Newpoints displayed = My$2,000,100.00 = Oops, the display number is adjusted by the amount +/- for one game / The actual total has not changed in the database.

Now change setting to -50
If (Number of points users earn or lose by playing a game = -50 )
Newpoints displayed = You have My$1,999,950.00 = Oops... Same as above, no change in the database, but the display number is wrong.

goto newpoints.php?action=bank
Correct balance = My$2,000,000.00
FYI: You already know the Bank withdrawal fee is fixed, thank you.

#
Can someone (anyone) please verify this so I know if my files are messed up, or if it is a real bug?

##
EDIT:
It's real enough...
Here is a temporary fix:
* Temp Fix does work
* Temp Fix !!! requires php in templates plugin & your desire to waste a bit of time!

PHP Code:
inc/languages/english/games_newpoints.lang.php
Line 25 remove 
' {1}.', & leave the rest of line 25   // No extra space needed inside the " "'s

games_newpoints template
find
{$lang->games_newpoints_money}

replace with
{$lang->games_newpoints_money} <?php echo $mybb->settings['newpoints_main_curprefix'] . number_format($mybb->user['newpoints'], 2'.'','?>


FYI: The template system will sometimes mess with your php:
<?php echo number_format($mybb->user['newpoints'],&nbsp;2,&nbsp;'.',&nbsp;',') ?>
by adding these nbsp;
It usually works on a second try. Tongue
How are those numbers wrong? That happens before or after playing the game?
How are those numbers wrong?
Details below / Simple answer: The display number is +/- the exact amount of "Number of points users earn or lose by playing a game"


That happens before or after playing the game?
Both, anytime, always off by whatever amount "Number of points users earn or lose by playing a game" is set for.

^^^
Full Answer here:

Actual Newpoints = My$2,000,000.00 (for example), w/ nice number formatting almost like real money. Smile
goto games.php
If (Number of points users earn or lose by playing a game = 0 )
Newpoints displayed = My$2,000,000.00 = No problem

If (Number of points users earn or lose by playing a game = 100 )
Newpoints displayed = My$2,000,100.00 = Oops, the display number is adjusted by the amount +/- for one game / The actual total has not changed in the database.

Now change setting to -50
If (Number of points users earn or lose by playing a game = -50 )
Newpoints displayed = You have My$1,999,950.00 = Oops... Same as above, no change in the database, but the display number is wrong.

goto newpoints.php?action=bank
Correct balance = My$2,000,000.00
FYI: You already know the Bank withdrawal fee is fixed, thank you.
I just don't see how the displayed numbers are wrong (can't check if the database is updated or not), but if the points the user ears/loses when playing a game is set to 100 (the user will get 100), and if the user has 1,000 it will obviously increase to 1,100
(06-11-2010, 03:31 AM)Pirata Nervo Wrote: [ -> ]I just don't see how...

The easiest way to verify:
Start at bank --> copy / paste (into Notepad) your total My$xxxxxxx
goto games.php
Your display total (without playing any games) is now +/- the same amount as the "Number of points users earn or lose by playing a game" unless that is set to zero.

The same bug is inherited from the MyPlaza Turbo games plugin.
Nothing major, but easy to verify.
Pages: 1 2 3 4 5