MyBB Community Forums

Full Version: RPG Stats PHP error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So this plugin works fine except for when I enter in the fid for the editable stats. Then it keeps throwing PHP errors. Is this a bug or am I setting up the custom profile fields wrong?

Quote:Warning [2] A non-numeric value encountered - Line: 250 - File: inc/plugins/rpgstats.php PHP 7.1.28 (Linux)

Oh I found the problem. When editing field ids of a user you have to edit all the fields and can't leave one blank.
how u setting custom profile fields bro realy i am don't know

[Image: Screenshot_1028.png]
[Image: Screenshot_1029.png]

how to do

but i installed this plugin

My board url is

https://forum.kuttysoft.com/

(2019-04-17, 06:20 PM)Metallix Wrote: [ -> ]So this plugin works fine except for when I enter in the fid for the editable stats. Then it keeps throwing PHP errors. Is this a bug or am I setting up the custom profile fields wrong?

Quote:Warning [2] A non-numeric value encountered - Line: 250 - File: inc/plugins/rpgstats.php PHP 7.1.28 (Linux)

Oh I found the problem. When editing field ids of a user you have to edit all the fields and can't leave one blank.

where we can edit there points its in admin panel or other ?
I set it up as a text box as well and made it only editable by admins/moderators. You have to use the id number for the RPG settings. For editing you edit the person's profile in the mod CP and add how much HP you want to take away.
(2019-04-17, 06:20 PM)Metallix Wrote: [ -> ]Oh I found the problem. When editing field ids of a user you have to edit all the fields and can't leave one blank.
Thanks for letting me know about this. You should be able to leave fields blank and the stats default to full. I fixed that warning and uploaded a new build. All you have to do is replace inc/plugins/rpgstats.php.

(2019-04-17, 06:48 PM)kuttysoft Wrote: [ -> ]how u setting custom profile fields bro realy i am don't  know
In the admin control panel, where you create and modify custom profile fields, hover over the field you want to use and look at the URL. Where it says "fid=", add that number to the Field ID box in RPG Stats Options.


(2019-04-17, 06:48 PM)kuttysoft Wrote: [ -> ]where we can edit there points its in admin panel or other ?
Since it's a custom profile field, it will show up in the user's account. You want to make these hidden, preferably, so that only mods and admin can edit them. This means, if done correctly, they should only show up when you edit the accounts in the admincp or modcp.
(2019-04-17, 08:20 PM)Settyness Wrote: [ -> ]
(2019-04-17, 06:20 PM)Metallix Wrote: [ -> ]Oh I found the problem. When editing field ids of a user you have to edit all the fields and can't leave one blank.
Thanks for letting me know about this. You should be able to leave fields blank and the stats default to full. I fixed that warning and uploaded a new build. All you have to do is replace inc/plugins/rpgstats.php.

Thanks for the quick response and fix. Smile Oh and for the plugin!
still i am confused someone send me one sample screen capture about custom profile field


Thank you
Here's the options I use for custom profile fields:
[attachment=41713]

For the "Editable by" option, use Ctrl + click and click on your staff groups (groups you want to be able to damage or heal users).

Make note of the "fid" in the URL. You use that number to fill out RPG Stats Options' fields.
[attachment=41712]
(2019-04-18, 08:36 AM)Settyness Wrote: [ -> ]Here's the options I use for custom profile fields:


For the "Editable by" option, use Ctrl + click and click on your staff groups (groups you want to be able to damage or heal users).

Make note of the "fid" in the URL. You use that number to fill out RPG Stats Options' fields.

Hi could you add a way for members to turn off these stats if they do not care to use them?
(2019-04-22, 04:38 PM)Metallix Wrote: [ -> ]
(2019-04-18, 08:36 AM)Settyness Wrote: [ -> ]Here's the options I use for custom profile fields:


For the "Editable by" option, use Ctrl + click and click on your staff groups (groups you want to be able to damage or heal users).

Make note of the "fid" in the URL. You use that number to fill out RPG Stats Options' fields.

Hi could you add a way for members to turn off these stats if they do not care to use them?
I added functionality to restrict who can see the RPG stats by usergroup as you requested (in a PM). To add it as an option per account might take some time to implement. I'll keep it in mind when I expand the plugin again.
You have to use the id number for the RPG settings. For Psiphon editing you edit the person's profile in the mod CP and add how much HP you want to take away.