BrainCMS | Credits currency is not changing while buying stuff

Status
Not open for further replies.

DanishAdam

Member
Jan 28, 2020
69
15
Hello Devbest!

Here some details about my hotel:
BrainCMS 1.8.1
Arcturus Morningstar 3.0.0
My hotel had a problem which is when users buying things on catalog, the credits balance is not changing. also on the statistic leaderboard. But it works when users use command ":pay <username> <amount> <type>", and the currency is working like, I have 10k, I use 5k to buy some stuff. Now I have 5k balance(but at the currency display we still have 10k). I still can't buy things that cost more than 5k credits or it will say "not enough credits blabla".
I don't really know whats the problem either swf or emu but I have some picture that maybe would explain the problem;
You must be registered for see images attach
You must be registered for see images attach

And btw, the diamonds also had the same problem. Please guide me to solve this problem, so I can fix the realated problem in the future!
Post automatically merged:

also, the starting credits is 10000. Also, some of the account above is the new/inactive users.
 
Last edited:
Solution
from this:
PHP:
            <div class="userstatsbox">
                <div style="color: #e99bdc; background-image: url(/templates/brain/style/images/icons/duckicon.png);" class="userstats">
                    <?= User::userData('activity_points') ?> <?= $lang["Mduckets"] ?>
                </div>
            </div>
You must be registered for see images attach

into this:
PHP:
            <div class="userstatsbox">
                <div style="color: #e99bdc; background-image: url(/templates/brain/style/images/icons/duckicon.png);" class="userstats">
                    <?= User::userData('pixels') ?> <?= $lang["Mduckets"] ?>
                </div>
            </div>

You must be registered for see images attach


but in client, it still use;

You must be registered for see images attach


which is not changing while buying...

boz

don daddy
Mar 23, 2021
201
98
Paste the sql that gathers the credits, duckets and diamonds info. It’s nothing todo with your emu unless it doesn’t update your purse after purchasing.
 

DanishAdam

Member
Jan 28, 2020
69
15
This is what I found
You must be registered for see images attach
You must be registered for see images attach
You must be registered for see images attach



Also, emulator_settings
You must be registered for see images attach


On me.php;

PHP:
            <div class="userstatsbox">
                <div style="color: #f8ef2b; background-image: url(/templates/brain/style/images/icons/crediticon.png);" class="userstats ">
                    <?= User::userData('credits') ?> <?= $lang["Mcredits"] ?>
                </div>
            </div>
            <div class="userstatsbox">
                <div style="color: #e99bdc; background-image: url(/templates/brain/style/images/icons/duckicon.png);" class="userstats">
                    <?= User::userData('activity_points') ?> <?= $lang["Mduckets"] ?>
                </div>
            </div>
            <div style="margin-bottom: 0px;" class="userstatsbox">
                <div style="color: #6caff4; background-image: url(/templates/brain/style/images/icons/diaicon.png);" class="userstats">
                    <?= User::userData('vip_points') ?>
                    <?= $lang["Mdiamond"] ?>
                </div>
            </div>

Also, in "/me" page credits = credits, duckets = activity_points, diamonds = vip_points.
I can see something wrong with the table's column on those table. What column should I add and in which table? Guide me to fix this issue please
 

boz

don daddy
Mar 23, 2021
201
98
Credits isn’t in the user settings table it’s stored in users table under ‘credits’. Points is not diamonds on the emulator, points are under user_currency with type 5 being diamonds type 0 being duckets and any custom currency on top of that. So your page isn’t collecting the right data, as it’s going to ‘vip_points’ which Arcturus does not use, so edit the code to fetch the correct data.
 

DanishAdam

Member
Jan 28, 2020
69
15
I changed me.php
PHP:
            <div class="userstatsbox">
                <div style="color: #e99bdc; background-image: url(/templates/brain/style/images/icons/duckicon.png);" class="userstats">
                    <?= User::userData('activity_points') ?> <?= $lang["Mduckets"] ?>
                </div>
            </div>
into
PHP:
            <div class="userstatsbox">
                <div style="color: #e99bdc; background-image: url(/templates/brain/style/images/icons/duckicon.png);" class="userstats">
                    <?= User::userData('pixels') ?> <?= $lang["Mduckets"] ?>
                </div>
            </div>
and now my duckets balance in /me page is "500", refer to users table. But, in client it still use "activity_points" as a duckets, not "pixels". How can I fix that?
Post automatically merged:

even if I replaced the users table with the new column "credits","activity_points","vip_points", the currency in the client is not changing
 

boz

don daddy
Mar 23, 2021
201
98
I changed me.php
PHP:
            <div class="userstatsbox">
                <div style="color: #e99bdc; background-image: url(/templates/brain/style/images/icons/duckicon.png);" class="userstats">
                    <?= User::userData('activity_points') ?> <?= $lang["Mduckets"] ?>
                </div>
            </div>
into
PHP:
            <div class="userstatsbox">
                <div style="color: #e99bdc; background-image: url(/templates/brain/style/images/icons/duckicon.png);" class="userstats">
                    <?= User::userData('pixels') ?> <?= $lang["Mduckets"] ?>
                </div>
            </div>
and now my duckets balance in /me page is "500", refer to users table. But, in client it still use "activity_points" as a duckets, not "pixels". How can I fix that?
Post automatically merged:

even if I replaced the users table with the new column "credits","activity_points","vip_points", the currency in the client is not changing
The client doesn’t go off ‘pixels’ it goes off users_currency.
 

Wieiscool

New Member
Jan 27, 2013
28
11
You must be registered for see images attach

Those points are irrelevant, the diamonds are in users_currency with type 5.
From what I have figured out is that those points in users do absolutely nothing

But, in client it still use "activity_points" as a duckets, not "pixels". How can I fix that?
What do you mean exactly? The wrong name or image? Do you have a screenshot/picture?
 

DanishAdam

Member
Jan 28, 2020
69
15
Those points are irrelevant, the diamonds are in users_currency with type 5.
From what I have figured out is that those points in users do absolutely nothing


What do you mean exactly? The wrong name or image? Do you have a screenshot/picture?
from this:
PHP:
            <div class="userstatsbox">
                <div style="color: #e99bdc; background-image: url(/templates/brain/style/images/icons/duckicon.png);" class="userstats">
                    <?= User::userData('activity_points') ?> <?= $lang["Mduckets"] ?>
                </div>
            </div>
You must be registered for see images attach

into this:
PHP:
            <div class="userstatsbox">
                <div style="color: #e99bdc; background-image: url(/templates/brain/style/images/icons/duckicon.png);" class="userstats">
                    <?= User::userData('pixels') ?> <?= $lang["Mduckets"] ?>
                </div>
            </div>

You must be registered for see images attach


but in client, it still use;

You must be registered for see images attach


which is not changing while buying catalog items. but, for the camera purchase its works well, its subtract my duckets balance. and when I use command ": points x 100 0", the ducket changes. I'm confusing tho
 

Morohara

Member
May 18, 2020
92
55
Cms is pulling information from the users table when it should be pulling from user_currency. If what they have typed is true regarding to other posts you need to direct the cms to pull from the user_currency table not the users table.

Ill reiterate abit more. If the users information eg; Pixels is stored in the user_currency and you tell the cms to pull data from the users table then it will only show information from the users table. This is why if you look at the screenshots the pixels match up with the users table but as said by someone else that information is stored inside of the user_currency table. So the fix would be getting the cms to to pull the relevant information from the correct table.
 
Last edited:

DanishAdam

Member
Jan 28, 2020
69
15
Cms is pulling information from the users table when it should be pulling from user_currency. If what they have typed is true regarding to other posts you need to direct the cms to pull from the user_currency table not the users table.

Ill reiterate abit more. If the users information eg; Pixels is stored in the user_currency and you tell the cms to pull data from the users table then it will only show information from the users table. This is why if you look at the screenshots the pixels match up with the users table but as said by someone else that information is stored inside of the user_currency table. So the fix would be getting the cms to to pull the relevant information from the correct table.
what is the "type" for credits? because credits doesn't shows in users_currency
 

boz

don daddy
Mar 23, 2021
201
98
from this:
PHP:
            <div class="userstatsbox">
                <div style="color: #e99bdc; background-image: url(/templates/brain/style/images/icons/duckicon.png);" class="userstats">
                    <?= User::userData('activity_points') ?> <?= $lang["Mduckets"] ?>
                </div>
            </div>
You must be registered for see images attach

into this:
PHP:
            <div class="userstatsbox">
                <div style="color: #e99bdc; background-image: url(/templates/brain/style/images/icons/duckicon.png);" class="userstats">
                    <?= User::userData('pixels') ?> <?= $lang["Mduckets"] ?>
                </div>
            </div>

You must be registered for see images attach


but in client, it still use;

You must be registered for see images attach


which is not changing while buying catalog items. but, for the camera purchase its works well, its subtract my duckets balance. and when I use command ": points x 100 0", the ducket changes. I'm confusing tho
You probably have infinite currency set as your rank so it won’t subtract for you.... the clients purse is correct it’s your cms that’s pulling the data from the wrong places, if you look on the Q&A sub I’ve posted a MySQL code in nateforever’s post that pulls the correct duckets just use that and alter it to type 5 for diamonds.
 
Solution

DanishAdam

Member
Jan 28, 2020
69
15
You probably have infinite currency set as your rank so it won’t subtract for you.... the clients purse is correct it’s your cms that’s pulling the data from the wrong places, if you look on the Q&A sub I’ve posted a MySQL code in nateforever’s post that pulls the correct duckets just use that and alter it to type 5 for diamonds.
Yes, now I figured it out. My currency is just infinite!
Post automatically merged:

thanks to all of you @boz , @Wieiscool , @Morohara for heping me to solve this issue. :D
 
Status
Not open for further replies.

Users who are viewing this thread

Top