Jump to content

2 Screenshots

  • 64.9k
  • 1.9k
  • 16.36 kB

Recommended Comments



Jbird

Posted

As a note for anyone with larger stack sizes for fuel, it only displays the first 3 digits.

But you can reduce the font size in the section of code in lines 193-197 a bit and it will fit four digits.

                {

                    var container = UI.CreateElementContainer ( "cfuilui.amount", "0 0 0 0", "0.45 0.12", "0.53 0.21" );

                    UI.Label ( ref container, "cfuilui.amount", $"{GetFuelAmount ()}", 10, "0.3 0.28", "0.52 0.53" );

                    CuiHelper.AddUi ( player, container );

                }

I simply changed the font size from 12 to 10 and the whole number is now displayed.

  • Love 1
Jbird

Posted

1 minute ago, Raul Maintained said:

Added!

Well damn, that was quick! Thank you!

Actually use them a decent bit on our servers, including beyond their native function.

Much appreciated bud, thanks for the smooth and simple plugin and UI!

  • Love 1
Jbird

Posted

@Raul Maintained Especially since you got back so quick and added that for me, I wanted to point something out. I've had intermittent issues with the files generated by this plugin. I'm not sure how much of the issue is on my end but I'll explain. I downloaded 1.0.5 just not long ago (obviously haha), uploaded it, and got this error in console when it loaded.

Failed to call hook 'OnServerInitialized' on plugin 'CFuelUI v1.0.5' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Game.Rust.Libraries.Command.AddChatCommand (System.String command, Oxide.Core.Plugins.Plugin plugin, System.Action`3[T1,T2,T3] callback) [0x00000] in <c0237423b12b41c686a3984435d0e163>:0
at Oxide.Game.Rust.Libraries.Command.AddChatCommand (System.String name, Oxide.Core.Plugins.Plugin plugin, System.String callback) [0x00014] in <c0237423b12b41c686a3984435d0e163>:0
at Oxide.Plugins.CFuelUI.OnServerInitialized () [0x00036] in <0b03ac2f091c4e70ae3315bcb4694f1f>:0
at Oxide.Plugins.CFuelUI.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0006a] in <0b03ac2f091c4e70ae3315bcb4694f1f>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <cc99cb05b42e4ea494cdf294badea406>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <99d545163fdd4d57a562df7989f2ca0a>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <99d545163fdd4d57a562df7989f2ca0a>:0


I had some minor issues before with previous versions and was able to sort them out somehow on their own and using one file to fix the other.

This time I noticed that even the default plugin file is coming up with a handful of icons or letters in the .CS file that are not properly showing up on my end. I opened this directly from the downloaded file, into VSC, and was able to see the icons coming up as � in the .CS file. These were also part of the config so I just needed to find one of the working versions I had in a backup file to patch the CS (and the JSON) and it runs just fine now.

I can attach either version, including the one that I just sorted out if you'd like for 1.0.5. I am actually working with my host to suggest that they be able to read special characters for instances just like this. I get many products that are written in multiple languages, and even though the English part of the configs have characters that are in the English alphabet, they come up as either an empty square, or the � symbol at times. I am having to do a lot of downloading, editing in VSC myself, and then uploading directly to avoid these instances whenever possible.

I wanted to bring it up though because it appears to me that they are coming up in the downloaded version. But I think it may be partially on my end or my machines end where I need to teach it some more characters perhaps? I just thought I would mention it in case anyone else experiences anything similar. My host seems to be the common denominator in most of my issues, their editor seems to not like certain special characters. But in this case I'm not really sure who the culprit is. Just wanted to help fix if needed.

  • Like 1
Raul Maintained

Posted

I updated this now. You must delete previous config for it to load right.

 

  • Like 1
Jbird

Posted

On 7/28/2022 at 7:42 AM, Raul Maintained said:

I updated this now. You must delete previous config for it to load right.

 

Please don't hate me.

Just for the record, for anyone using the French config.

            //French
            lang.RegisterMessages ( new Dictionary<string, string>
            {
                [ "UIOn" ] = "Affichage <color=#90ee90>activ�</color>",
                [ "UIOff" ] = "Affichage <color=#f08080>d�sactiv�</color>",
            }, this, "fr" );

..should be..

            //French
            lang.RegisterMessages ( new Dictionary<string, string>
            {
                [ "UIOn" ] = "Affichage <color=#90ee90>activé</color>",
                [ "UIOff" ] = "Affichage <color=#f08080>désactivé</color>",
            }, this, "fr" );

Regardless, thank you for the quick responses.

Already sorted on my end but wanted you to have the fix too.

Tezza

Posted

think new version bugged

Failed to call hook 'OnServerInitialized' on plugin 'CFuelUI v1.0.6' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Game.Rust.Libraries.Command.AddChatCommand (System.String command, Oxide.Core.Plugins.Plugin plugin, System.Action`3[T1,T2,T3] callback) [0x00000] in <3c65fe4750484e27be279cf4126c147d>:0
at Oxide.Game.Rust.Libraries.Command.AddChatCommand (System.String name, Oxide.Core.Plugins.Plugin plugin, System.String callback) [0x00014] in <3c65fe4750484e27be279cf4126c147d>:0
at Oxide.Plugins.CFuelUI.OnServerInitialized () [0x00036] in <a07ab411ff2a41b5a12fb283a575043d>:0
at Oxide.Plugins.CFuelUI.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0006a] in <a07ab411ff2a41b5a12fb283a575043d>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <cc99cb05b42e4ea494cdf294badea406>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <99d545163fdd4d57a562df7989f2ca0a>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <99d545163fdd4d57a562df7989f2ca0a>:0

 

Jbird

Posted

3 hours ago, Terry Gibson said:

think new version bugged

Did you delete the older config? If not try deleting that to create a new one and it should be good to go.
Save a backup of the current config if you want to easily transfer over the information you had in it.

It is probably just not reading the new config as it has been changed slightly.

Tezza

Posted

yeah it worked sorry for wasting your time

 

Jbird

Posted

5 hours ago, Terry Gibson said:

yeah it worked sorry for wasting your time

 

All good no worries. I never consider helping others time wasted, quite the opposite in fact.

Glad that sorted it.

Suerion

Posted

Did we need the config reload? ->

NullReferenceException: Object reference not set to an instance of an object
  at Oxide.Plugins.CFuelUI+FuelUI.Update () [0x00000] in <7a4ebdd7b41349ca8bf1cdf3bd353d7b>:0

 

Jbird

Posted

4 minutes ago, Suerion said:

Did we need the config reload? ->

NullReferenceException: Object reference not set to an instance of an object
  at Oxide.Plugins.CFuelUI+FuelUI.Update () [0x00000] in <7a4ebdd7b41349ca8bf1cdf3bd353d7b>:0

Yes.

Save a copy of your config first if you would like, then delete it.

Then reload the plugin, and reconfigure the new config file that will be generated using your old information.

It should run fine after that.

  • Like 1
Suerion

Posted

3 hours ago, Jbird said:

Yes.

Save a copy of your config first if you would like, then delete it.

Then reload the plugin, and reconfigure the new config file that will be generated using your old information.

It should run fine after that.

Nope, it is not a problem with the Config, it spams our Log with this error

 

Jbird

Posted

7 hours ago, Suerion said:

Nope, it is not a problem with the Config, it spams our Log with this error

Which version do you have of the plugin?

Can you reload the plugin and share what console messages are given in response.

Suerion

Posted

Hey, we work on 1.0.6, the issue does not show up on plugin reload, it spams always, on flying, driving, etc.

10 hours ago, Jbird said:

Which version do you have of the plugin?

Can you reload the plugin and share what console messages are given in response.

 

Jbird

Posted

30 minutes ago, Suerion said:

Hey, we work on 1.0.6, the issue does not show up on plugin reload, it spams always, on flying, driving, etc.

Do you mind sharing your config?

Suerion

Posted

5 hours ago, Jbird said:

Do you mind sharing your config?

Sorry i‘m on mobile phone i could not convert it better yet

 

{
  "CONFIG": {
    "Chat command": "fuel",
    "Prefix": "<color=#aabf7d>SERVER</color> <color=#ebd077>FUEL UI</color> : ",
    "Icon": 0,
    "Disable for minicopter and scrap heli": false,
    "Disable for snowmobiles": false
  },
  "VERSION": {
    "Major": 1,
    "Minor": 0,
    "Patch": 6
  }
}

Jbird

Posted

11 hours ago, Suerion said:

Sorry i‘m on mobile phone i could not convert it better yet

{
  "CONFIG": {
    "Chat command": "fuel",
    "Prefix": "<color=#aabf7d>SERVER</color> <color=#ebd077>FUEL UI</color> : ",
    "Icon": 0,
    "Disable for minicopter and scrap heli": false,
    "Disable for snowmobiles": false
  },
  "VERSION": {
    "Major": 1,
    "Minor": 0,
    "Patch": 6
  }
}

Config does indeed look fine.

I would try removing and uploading the plugin itself again. If the problem persists I'd be at a loss though.  Config does look fine and I see that the code is having an issue trying to create the UI. Does the UI show up for you?

Also when the error comes up did you share the entire error or is there more to it perhaps?

Suerion

Posted

8 hours ago, Jbird said:

Config does indeed look fine.

I would try removing and uploading the plugin itself again. If the problem persists I'd be at a loss though.  Config does look fine and I see that the code is having an issue trying to create the UI. Does the UI show up for you?

Also when the error comes up did you share the entire error or is there more to it perhaps?

Hey, the ui shows, but ther could be the issue, because after building the ui, it spams the error

Watcher

Posted

100+ mb log file filled with:
NullReferenceException: Object reference not set to an instance of an object
  at Oxide.Plugins.CFuelUI+FuelUI.Update () [0x00000] in <3584d0d5c1024e51be44b0334b0aa1d3>:0
(Filename: <3584d0d5c1024e51be44b0334b0aa1d3> Line: 0)

Suerion

Posted

2 minutes ago, Watcher said:

100+ mb log file filled with:
NullReferenceException: Object reference not set to an instance of an object
  at Oxide.Plugins.CFuelUI+FuelUI.Update () [0x00000] in <3584d0d5c1024e51be44b0334b0aa1d3>:0
(Filename: <3584d0d5c1024e51be44b0334b0aa1d3> Line: 0)

He would update it soon

Suerion

Posted

@Jbirddid you update the plugin since?

Jbird

Posted

23 minutes ago, Suerion said:

@Jbirddid you update the plugin since?

It's not my plugin I had just helped sort out a couple things.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Like 3

User Feedback

1.5m

Downloads

Total number of downloads.

7.3k

Customers

Total customers served.

108.5k

Files Sold

Total number of files sold.

2.2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.