[Plugin] i build plugin but not working correctly , can someone assist me?

Plugin SourceCode : OB2TestPlugin.7z - AnonFiles
Issue : arguments can’t appear in the browser , How do i know where the problem is ?

Methods.cs :arrow_down:

using RuriLib.Attributes;
using RuriLib.Logging;
using RuriLib.Models.Bots;

namespace RuriLib.Blocks.Puppeteer.Arguments
{
    [BlockCategory("BrowserArguments", "This Block is the same as CMD arguments in Settings Section , But this allow you to integrat all types of puppeteer arguments with input variable section :)", "#e9967a")]
    public static class Methods
    {
        [Block("This Block is the same as CommandLineArgs in Settings Section , But this allow you to integrat all types of puppeteer arguments with input variable option (Created By xSUNMANx) ", name = "BasicCMD")]
        public static string Args(BotData data, string ArgInput)
        {
            var args = data.ConfigSettings.BrowserSettings.CommandLineArgs;
            args += $"{ArgInput}";
            data.Logger.LogHeader();
            data.Logger.Log($"CommandLineArgs: {args}", LogColors.YellowGreen);
            return args;
        }
    }
}

A -
image
B- All fine in this pic u can see , our plugin make additional arguments
image

You have to set them again in the original place after changing them.
In C# you don’t get a reference to the original string if you reassign to a new variable, it copies the string over. So if you want to put it back where it was, you have to manually do it.

data.ConfigSettings.BrowserSettings.CommandLineArgs = args;

immagine

Also mind that if you change this dynamically and use more than 1 bot, the bots will conflict with each other and might change the value of that field in unexpected ways.

1 Like

Thanks dude for the reply
I’m not good at c#, I hack sometimes, I’ll take this seriously, I’ve been using the same logic in OB1 and it works without problems, I’ll try to develop it to share with the community in the future, detailing the features of this plugin.

Anyway , your feedback very helpful.

OB1 Plugin Concept :arrow_down:
image

1 Like

Don’t worry ^^ as long as you’re learning it’s all good. Nice plugin!

1 Like

The best solution in my opinion is to make Command line argument Input as Interpolated string/Variable/Fixed

Yes that makes sense, please open an issue

1 Like

I did it and you promised me it would be in version 0.2.2

Oh alright, sorry about it, work has been very demanding and I didn’t have much time for OB2.

1 Like

Well, there’s nothing wrong, don’t worry about that, I wish u all the luck
Just remember me in the upcoming update. :white_heart:

1 Like