Solved Some plugins with configs don't work properly

Jeffro

Member
Member
Sep 1, 2014
25
3
8
Hi there,

Recently (like 6 hours ago) I've made the switch from Oxide to Fougerite and for now I seem to have 2 plugins which don't work properly.

My server is hosted at Gameservers.com so I had to go through Ticket Support to get Fougerite installed.

The following plugins seem to have issues:

Voter (http://gomagma.org/community/index.php?resources/voter.61/) and FPSBoost (http://fougerite.com/resources/fpsboost.18/)

When I try to use /vote it comes up with "Config does not exist"
And when I try to use /fps it does work but the username is changed to "Config does not exist" as well.

Here is my folder structure in the server: http://puu.sh/biadc.png and http://puu.sh/biaf2.png
As you can see both plugins are already using the exact same name as the plugin is called.

Here are some snippets of the code in the plugins, I think the following call is what is actually failing:
"Data.GetConfigValue"

JavaScript:
var config = "Voter";

function checkReward(set) {
    var rewardsArray = [];
    var x = 0;
    while(true) { //Iterate through the config.
        var rewards = Data.GetConfigValue(config, "RewardSet"+set, "reward"+x); //Read the reward at that particular line.
        if(rewards != null) { //Check to see if you have reached the end of the config for rewards.
            rewardsArray.push(rewards);
            x = x+1;
        } else {
            break;
        }
    }
    return rewardsArray;
}
JavaScript:
var name = Data.GetConfigValue("FPSBoost", "Settings", "name");
        var cooldown = Data.GetConfigValue("FPSBoost", "Settings", "cd");
        var time = Data.GetTableValue("FPSBoost", Player.SteamID);
I would like to hear your thoughts and on what I can do to have these plugins working.
I am also open to any suggestions or any good alternatives to the plugins I am using. I'm trying to have a good user experience for my server :)

With kind regards,
Jeffro

Edit:

It also seems the plugin Rank++ is creating a lot of errors in my console:

Code:
MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
Any idea if its the plugin or if there's a problem with the way the server is configured?
 
Last edited:

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia
Hi there,

Recently (like 6 hours ago) I've made the switch from Oxide to Fougerite and for now I seem to have 2 plugins which don't work properly.

My server is hosted at Gameservers.com so I had to go through Ticket Support to get Fougerite installed.

The following plugins seem to have issues:

Voter (http://gomagma.org/community/index.php?resources/voter.61/) and FPSBoost (http://fougerite.com/resources/fpsboost.18/)

When I try to use /vote it comes up with "Config does not exist"
And when I try to use /fps it does work but the username is changed to "Config does not exist" as well.

Here is my folder structure in the server: http://puu.sh/biadc.png and http://puu.sh/biaf2.png
As you can see both plugins are already using the exact same name as the plugin is called.

Here are some snippets of the code in the plugins, I think the following call is what is actually failing:
"Data.GetConfigValue"

JavaScript:
var config = "Voter";

function checkReward(set) {
    var rewardsArray = [];
    var x = 0;
    while(true) { //Iterate through the config.
        var rewards = Data.GetConfigValue(config, "RewardSet"+set, "reward"+x); //Read the reward at that particular line.
        if(rewards != null) { //Check to see if you have reached the end of the config for rewards.
            rewardsArray.push(rewards);
            x = x+1;
        } else {
            break;
        }
    }
    return rewardsArray;
}
JavaScript:
var name = Data.GetConfigValue("FPSBoost", "Settings", "name");
        var cooldown = Data.GetConfigValue("FPSBoost", "Settings", "cd");
        var time = Data.GetTableValue("FPSBoost", Player.SteamID);
I would like to hear your thoughts and on what I can do to have these plugins working.
I am also open to any suggestions or any good alternatives to the plugins I am using. I'm trying to have a good user experience for my server :)

With kind regards,
Jeffro

Edit:

It also seems the plugin Rank++ is creating a lot of errors in my console:

Code:
MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
Any idea if its the plugin or if there's a problem with the way the server is configured?
Using Fougerite V1.0.3 will fix the config error, not sure about the Rank++
 

Jeffro

Member
Member
Sep 1, 2014
25
3
8
Using Fougerite V1.0.3 will fix the config error, not sure about the Rank++
Any idea when this will be fixed?

I don't know if gameservers.com is willing to keep switching between versions for me, especially going back to a different version, I don't want to bother them too much with my idea of perfecting the server :) (I can't access the part I need to to do it myself :( )
 

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia
Any idea when this will be fixed?

I don't know if gameservers.com is willing to keep switching between versions for me, especially going back to a different version, I don't want to bother them too much with my idea of perfecting the server :) (I can't access the part I need to to do it myself :( )
I think the Config errors are just from the developer who created them. Currently DeathMSG's, TPFriend & HomeSystem all made by @DreTaX has the config errors.
I am sure he'll fix them soon or maybe fougerite might get an update.
 

Snake

Moderator
Moderator
Jul 13, 2014
288
174
28
I'm switching all my plugins (including Rank++) to C# at the moment. I'm getting some errors with the DataStore but when I fix them I'll update it and add more features.

By the way, these errors are not from my plugin.

On the hook PlayerGathering my code is simple :
JavaScript:
function On_PlayerGathering(Player, ge) {
    var count = DataStore.Get("Rank++", Player.SteamID + "gath");
    DataStore.Add("Rank++", Player.SteamID + "gath", count + 1);
    DataStore.Save();
}
I'm not storing any Vector3, check other plugins.
 

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia
Any idea when this will be fixed?

I don't know if gameservers.com is willing to keep switching between versions for me, especially going back to a different version, I don't want to bother them too much with my idea of perfecting the server :) (I can't access the part I need to to do it myself :( )
I have fixed FPSBoost, Remember it is a unoffical fix so if DreTax updates his plugin you should download it.
(NOTE: This creates the settings config on a restart or reload).

For anyone not bothered to download, heres the code:
JavaScript:
//**UNOFFICAL FIX FOR FOUGERITE V1.0.5**

/**
* Created by DreTaX on 2014.05.04.. V1.2
*/
function On_PluginInit() {
    if(!Plugin.IniExists("FPSBoost"))
    {
        Plugin.CreateIni("FPSBoost");
        var iniCfg = Plugin.GetIni("FPSBoost");
        iniCfg.AddSetting("Settings", "cd", "10000");
        iniCfg.AddSetting("Settings", "name", "FPSBOOSTER");
        iniCfg.Save();
    }
}

function On_Command(Player, cmd, args) {
    if (cmd == "graph") {
        var inicfg = Plugin.GetIni("FPSBoost");
        var name = inicfg.GetSetting("Settings", "name");
        var cooldown = inicfg.GetSetting("FPSBoost", "Settings", "cd");
        var time = Data.GetTableValue("FPSBoost", Player.SteamID);
        if (cooldown > 0) {
            var calc = System.Environment.TickCount - time;
            if (time == undefined || time == null || calc < 0 || isNaN(calc)) {
                time = Data.AddTableValue("FPSBoost", Player.SteamID, System.Environment.TickCount);
            }
            if (calc >= cooldown) {
                Data.AddTableValue("FPSBoost", Player.SteamID, System.Environment.TickCount);
                Player.SendCommand("grass.on true");
                Player.SendCommand("grass.forceredraw true");
                Player.SendCommand("grass.displacement false");
                Player.SendCommand("grass.disp_trail_seconds 10");
                Player.SendCommand("grass.shadowcast true");
                Player.SendCommand("grass.shadowreceive true");
                Player.SendCommand("render.level 1");
                Player.SendCommand("render.vsync true");
                Player.SendCommand("footsteps.quality 2");
                Player.SendCommand("gfx.grain true");
                Player.SendCommand("gfx.ssao true");
                Player.SendCommand("gfx.shafts true");
                Player.SendCommand("gfx.damage true");
                Player.SendCommand("gfx.tonemap true");
                Player.SendCommand("gfx.ssaa true");
                Player.SendCommand("gfx.bloom true");
                Player.MessageFrom(name, "You Switched to Graphics Mode!");
            }
            else {
                Player.Notice("You have to wait before typing it again!");
                var next = calc / 1000;
                next = next / 60;
                var def = cooldown / 1000;
                def = def / 60;
                var done = Number(next).toFixed(2);
                var done2 = Number(def).toFixed(2);
                Player.MessageFrom(name, "Time Remaining: " + done + "/" + done2);
            }
        }
        else {
            Player.SendCommand("grass.on true");
            Player.SendCommand("grass.forceredraw true");
            Player.SendCommand("grass.displacement false");
            Player.SendCommand("grass.disp_trail_seconds 10");
            Player.SendCommand("grass.shadowcast true");
            Player.SendCommand("grass.shadowreceive true");
            Player.SendCommand("render.level 1");
            Player.SendCommand("render.vsync true");
            Player.SendCommand("footsteps.quality 2");
            Player.SendCommand("gfx.grain true");
            Player.SendCommand("gfx.ssao true");
            Player.SendCommand("gfx.shafts true");
            Player.SendCommand("gfx.damage true");
            Player.SendCommand("gfx.tonemap true");
            Player.SendCommand("gfx.ssaa true");
            Player.SendCommand("gfx.bloom true");
            Player.MessageFrom(name, "You Switched to Graphics Mode!");
        }
    }
    else if (cmd == "fps") {
        var inicfg = Plugin.GetIni("FPSBoost");
        var name = inicfg.GetSetting("Settings", "name");
        var cooldown = inicfg.GetSetting("Settings", "cd");
        var time = Data.GetTableValue("FPSBoost", Player.SteamID);
        if (cooldown > 0) {
            var calc = System.Environment.TickCount - time;
            if (time == undefined || time == null || calc < 0 || isNaN(calc)) {
                time = Data.AddTableValue("FPSBoost", Player.SteamID, System.Environment.TickCount);
            }
            if (calc >= cooldown) {
                Data.AddTableValue("FPSBoost", Player.SteamID, System.Environment.TickCount);
                Player.SendCommand("grass.on false");
                Player.SendCommand("grass.forceredraw False");
                Player.SendCommand("grass.displacement True");
                Player.SendCommand("grass.disp_trail_seconds 0");
                Player.SendCommand("grass.shadowcast False");
                Player.SendCommand("grass.shadowreceive False");
                Player.SendCommand("render.level 0");
                Player.SendCommand("render.vsync False");
                Player.SendCommand("footsteps.quality 2");
                Player.SendCommand("gfx.grain False");
                Player.SendCommand("gfx.ssao False");
                Player.SendCommand("gfx.shafts false");
                Player.SendCommand("gfx.damage false");
                Player.SendCommand("gfx.ssaa False");
                Player.SendCommand("gfx.bloom False");
                Player.SendCommand("gfx.tonemap False");
                Player.MessageFrom(name, "You Switched to FPS Mode!");
            }
            else {
                Player.Notice("You have to wait before typing it again!");
                var next = calc / 1000;
                next = next / 60;
                var def = cooldown / 1000;
                def = def / 60;
                var done = Number(next).toFixed(2);
                var done2 = Number(def).toFixed(2);
                Player.MessageFrom(name, "Time Remaining: " + done + "/" + done2);
            }
        }
        else {
            Player.SendCommand("grass.on false");
            Player.SendCommand("grass.forceredraw False");
            Player.SendCommand("grass.displacement True");
            Player.SendCommand("grass.disp_trail_seconds 0");
            Player.SendCommand("grass.shadowcast False");
            Player.SendCommand("grass.shadowreceive False");
            Player.SendCommand("render.level 0");
            Player.SendCommand("render.vsync False");
            Player.SendCommand("footsteps.quality 2");
            Player.SendCommand("gfx.grain False");
            Player.SendCommand("gfx.ssao False");
            Player.SendCommand("gfx.shafts false");
            Player.SendCommand("gfx.damage false");
            Player.SendCommand("gfx.ssaa False");
            Player.SendCommand("gfx.bloom False");
            Player.SendCommand("gfx.tonemap False");
            Player.MessageFrom(name, "You Switched to FPS Mode!");
        }
    }
}

function On_PlayerConnected(Player) {
    var name = Plugin.GetIni("FPSBoost", "Settings", "name");
    Player.MessageFrom(name, "Type /fps to increase /graph to decrease your fps.");
}
 

Attachments

  • Useful
Reactions: DreTaX

Jeffro

Member
Member
Sep 1, 2014
25
3
8
I have fixed FPSBoost, Remember it is a unoffical fix so if DreTax updates his plugin you should download it.
(NOTE: This creates the settings config on a restart or reload).

For anyone not bothered to download, heres the code:
JavaScript:
//**UNOFFICAL FIX FOR FOUGERITE V1.0.5**

/**
* Created by DreTaX on 2014.05.04.. V1.2
*/
function On_PluginInit() {
    if(!Plugin.IniExists("FPSBoost"))
    {
        Plugin.CreateIni("FPSBoost");
        var iniCfg = Plugin.GetIni("FPSBoost");
        iniCfg.AddSetting("Settings", "cd", "10000");
        iniCfg.AddSetting("Settings", "name", "FPSBOOSTER");
        iniCfg.Save();
    }
}

function On_Command(Player, cmd, args) {
    if (cmd == "graph") {
        var inicfg = Plugin.GetIni("FPSBoost");
        var name = inicfg.GetSetting("Settings", "name");
        var cooldown = inicfg.GetSetting("FPSBoost", "Settings", "cd");
        var time = Data.GetTableValue("FPSBoost", Player.SteamID);
        if (cooldown > 0) {
            var calc = System.Environment.TickCount - time;
            if (time == undefined || time == null || calc < 0 || isNaN(calc)) {
                time = Data.AddTableValue("FPSBoost", Player.SteamID, System.Environment.TickCount);
            }
            if (calc >= cooldown) {
                Data.AddTableValue("FPSBoost", Player.SteamID, System.Environment.TickCount);
                Player.SendCommand("grass.on true");
                Player.SendCommand("grass.forceredraw true");
                Player.SendCommand("grass.displacement false");
                Player.SendCommand("grass.disp_trail_seconds 10");
                Player.SendCommand("grass.shadowcast true");
                Player.SendCommand("grass.shadowreceive true");
                Player.SendCommand("render.level 1");
                Player.SendCommand("render.vsync true");
                Player.SendCommand("footsteps.quality 2");
                Player.SendCommand("gfx.grain true");
                Player.SendCommand("gfx.ssao true");
                Player.SendCommand("gfx.shafts true");
                Player.SendCommand("gfx.damage true");
                Player.SendCommand("gfx.tonemap true");
                Player.SendCommand("gfx.ssaa true");
                Player.SendCommand("gfx.bloom true");
                Player.MessageFrom(name, "You Switched to Graphics Mode!");
            }
            else {
                Player.Notice("You have to wait before typing it again!");
                var next = calc / 1000;
                next = next / 60;
                var def = cooldown / 1000;
                def = def / 60;
                var done = Number(next).toFixed(2);
                var done2 = Number(def).toFixed(2);
                Player.MessageFrom(name, "Time Remaining: " + done + "/" + done2);
            }
        }
        else {
            Player.SendCommand("grass.on true");
            Player.SendCommand("grass.forceredraw true");
            Player.SendCommand("grass.displacement false");
            Player.SendCommand("grass.disp_trail_seconds 10");
            Player.SendCommand("grass.shadowcast true");
            Player.SendCommand("grass.shadowreceive true");
            Player.SendCommand("render.level 1");
            Player.SendCommand("render.vsync true");
            Player.SendCommand("footsteps.quality 2");
            Player.SendCommand("gfx.grain true");
            Player.SendCommand("gfx.ssao true");
            Player.SendCommand("gfx.shafts true");
            Player.SendCommand("gfx.damage true");
            Player.SendCommand("gfx.tonemap true");
            Player.SendCommand("gfx.ssaa true");
            Player.SendCommand("gfx.bloom true");
            Player.MessageFrom(name, "You Switched to Graphics Mode!");
        }
    }
    else if (cmd == "fps") {
        var inicfg = Plugin.GetIni("FPSBoost");
        var name = inicfg.GetSetting("Settings", "name");
        var cooldown = inicfg.GetSetting("Settings", "cd");
        var time = Data.GetTableValue("FPSBoost", Player.SteamID);
        if (cooldown > 0) {
            var calc = System.Environment.TickCount - time;
            if (time == undefined || time == null || calc < 0 || isNaN(calc)) {
                time = Data.AddTableValue("FPSBoost", Player.SteamID, System.Environment.TickCount);
            }
            if (calc >= cooldown) {
                Data.AddTableValue("FPSBoost", Player.SteamID, System.Environment.TickCount);
                Player.SendCommand("grass.on false");
                Player.SendCommand("grass.forceredraw False");
                Player.SendCommand("grass.displacement True");
                Player.SendCommand("grass.disp_trail_seconds 0");
                Player.SendCommand("grass.shadowcast False");
                Player.SendCommand("grass.shadowreceive False");
                Player.SendCommand("render.level 0");
                Player.SendCommand("render.vsync False");
                Player.SendCommand("footsteps.quality 2");
                Player.SendCommand("gfx.grain False");
                Player.SendCommand("gfx.ssao False");
                Player.SendCommand("gfx.shafts false");
                Player.SendCommand("gfx.damage false");
                Player.SendCommand("gfx.ssaa False");
                Player.SendCommand("gfx.bloom False");
                Player.SendCommand("gfx.tonemap False");
                Player.MessageFrom(name, "You Switched to FPS Mode!");
            }
            else {
                Player.Notice("You have to wait before typing it again!");
                var next = calc / 1000;
                next = next / 60;
                var def = cooldown / 1000;
                def = def / 60;
                var done = Number(next).toFixed(2);
                var done2 = Number(def).toFixed(2);
                Player.MessageFrom(name, "Time Remaining: " + done + "/" + done2);
            }
        }
        else {
            Player.SendCommand("grass.on false");
            Player.SendCommand("grass.forceredraw False");
            Player.SendCommand("grass.displacement True");
            Player.SendCommand("grass.disp_trail_seconds 0");
            Player.SendCommand("grass.shadowcast False");
            Player.SendCommand("grass.shadowreceive False");
            Player.SendCommand("render.level 0");
            Player.SendCommand("render.vsync False");
            Player.SendCommand("footsteps.quality 2");
            Player.SendCommand("gfx.grain False");
            Player.SendCommand("gfx.ssao False");
            Player.SendCommand("gfx.shafts false");
            Player.SendCommand("gfx.damage false");
            Player.SendCommand("gfx.ssaa False");
            Player.SendCommand("gfx.bloom False");
            Player.SendCommand("gfx.tonemap False");
            Player.MessageFrom(name, "You Switched to FPS Mode!");
        }
    }
}

function On_PlayerConnected(Player) {
    var name = Plugin.GetIni("FPSBoost", "Settings", "name");
    Player.MessageFrom(name, "Type /fps to increase /graph to decrease your fps.");
}
Thanks for the unofficial fix, it seems to work properly. It seems that something must've changed to the method used to using CFG files (although you rewrote it to use INI now which is fine by me as well, I might get into some plugin programming myself too since these wrappers do interest me :))
 

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia
Thanks for the unofficial fix, it seems to work properly. It seems that something must've changed to the method used to using CFG files (although you rewrote it to use INI now which is fine by me as well, I might get into some plugin programming myself too since these wrappers do interest me :))
It's pretty easy to learn :p
 

Jeffro

Member
Member
Sep 1, 2014
25
3
8
It's pretty easy to learn :p
Yeah I got some experience with PHP and C#. My javascript is very mediocre though but by reading through some of the scripts it seems it's more or less C# within Javascript now.

Are there any special requirements for C# plugins or can I place them in the same folder as the other plugins?
Also what do you use to test these scripts instead of scripting it, uploading it (or using a local test server) and trying it out?
I can't imagine there is a Fougerite IDE :p
 

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia
Yeah I got some experience with PHP and C#. My javascript is very mediocre though but by reading through some of the scripts it seems it's more or less C# within Javascript now.

Are there any special requirements for C# plugins or can I place them in the same folder as the other plugins?
Also what do you use to test these scripts instead of scripting it, uploading it (or using a local test server) and trying it out?
I can't imagine there is a Fougerite IDE :p
I wouldn't know about where to put C# plugins, But you can download a cracked server from ThePirateBay search for v1069 server.
Fougerite works on cracked servers ;)
 

balu92

Retired Staff
Retired Staff
Trusted Member
Jul 11, 2014
338
75
28
34
anticheat stores vector3s in the ds, you shouldn't use DataStore.Save()
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
Any idea when this will be fixed?

I don't know if gameservers.com is willing to keep switching between versions for me, especially going back to a different version, I don't want to bother them too much with my idea of perfecting the server :) (I can't access the part I need to to do it myself :( )
My apologies. I haven't look in it yet, but still idk whats wrong. I don't really have the time to look in it, but maybe @Jakkee or @balu92 could provide me a quick info whats the change that makes my plugin not to work in 1.0.5.
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
Hi there,

Recently (like 6 hours ago) I've made the switch from Oxide to Fougerite and for now I seem to have 2 plugins which don't work properly.

My server is hosted at Gameservers.com so I had to go through Ticket Support to get Fougerite installed.

The following plugins seem to have issues:

Voter (http://gomagma.org/community/index.php?resources/voter.61/) and FPSBoost (http://fougerite.com/resources/fpsboost.18/)

When I try to use /vote it comes up with "Config does not exist"
And when I try to use /fps it does work but the username is changed to "Config does not exist" as well.

Here is my folder structure in the server: http://puu.sh/biadc.png and http://puu.sh/biaf2.png
As you can see both plugins are already using the exact same name as the plugin is called.

Here are some snippets of the code in the plugins, I think the following call is what is actually failing:
"Data.GetConfigValue"

JavaScript:
var config = "Voter";

function checkReward(set) {
    var rewardsArray = [];
    var x = 0;
    while(true) { //Iterate through the config.
        var rewards = Data.GetConfigValue(config, "RewardSet"+set, "reward"+x); //Read the reward at that particular line.
        if(rewards != null) { //Check to see if you have reached the end of the config for rewards.
            rewardsArray.push(rewards);
            x = x+1;
        } else {
            break;
        }
    }
    return rewardsArray;
}
JavaScript:
var name = Data.GetConfigValue("FPSBoost", "Settings", "name");
        var cooldown = Data.GetConfigValue("FPSBoost", "Settings", "cd");
        var time = Data.GetTableValue("FPSBoost", Player.SteamID);
I would like to hear your thoughts and on what I can do to have these plugins working.
I am also open to any suggestions or any good alternatives to the plugins I am using. I'm trying to have a good user experience for my server :)

With kind regards,
Jeffro

Edit:

It also seems the plugin Rank++ is creating a lot of errors in my console:

Code:
MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
[MagmaPlugin] Error invoking function On_PlayerGathering in Rank++ plugin.
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
Any idea if its the plugin or if there's a problem with the way the server is configured?
Oh shit, i see now.
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
The difference is between the classes.
C#:
[Obsolete("Modules hosting plugins will manage plugin config files", false)]
    public string GetConfigValue(string config, string section, string key)
    {
      IniParser iniParser = (IniParser) Data.inifiles[(object) config.ToLower()];
      if (iniParser == null)
        return "Config does not exist";
      else
        return iniParser.GetSetting(section, key);
    }

public string GetConfigValue(string config, string section, string key)
    {
      IniParser iniParser = (IniParser) Data.inifiles[(object) config.ToLower()];
      if (iniParser == null)
        return "Config does not exist";
      else
        return iniParser.GetSetting(section, key);
    }
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
Even the default file of Drop++ (cfg) is also placed into the plugins folder.
It doesn't react if i put it on disabled. This must be a problem that Mr. @Riketta forgot, when he was modifying the paths.

Also, @Jakkee i just realised that with the Data.GetConfigValue, you would be able to read other plugin's inifile, or config lol.(Maybe)
 
  • Like
Reactions: Jakkee

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
Yeah I got some experience with PHP and C#. My javascript is very mediocre though but by reading through some of the scripts it seems it's more or less C# within Javascript now.

Are there any special requirements for C# plugins or can I place them in the same folder as the other plugins?
Also what do you use to test these scripts instead of scripting it, uploading it (or using a local test server) and trying it out?
I can't imagine there is a Fougerite IDE :p
You can simply use a C# ide.

You will need Fougerite for it, and ofc C# plugin dlls go to:

Modules/XYZPLUGIN/XYZ.DLL

Config/Inis:
Save/Xyzplugin/xyz.cfg

Take a look on our github page for some C# plugin examples.

Okay, now i did a hell of a spam here.
 

Jeffro

Member
Member
Sep 1, 2014
25
3
8
You can simply use a C# ide.

You will need Fougerite for it, and ofc C# plugin dlls go to:

Modules/XYZPLUGIN/XYZ.DLL

Config/Inis:
Save/Xyzplugin/xyz.cfg

Take a look on our github page for some C# plugin examples.

Okay, now i did a hell of a spam here.

Np for the spam, I need to learn more C# anyway.

So if C# plugins need to go in modules that means I can't use dll's at gameservers.com unless I ticket in every request since they don't allow me direct FTP access to modules but I will need to check in to that, I appreciate your responses though, very informative as well :)
 

mikec

Master Of All That I Survey
Retired Staff
Trusted Member
Jul 12, 2014
296
152
28
Los Angeles, California, USA
Did you mention what build you're using? Because I made those changes to the Data class, moving the config file handling into the MagmaPlugin and JintPlugin. I did that because loading plugin configs WASN'T working. So I have to wonder if somehow you got an intermediate build.

Did your build come with Drop++ in the Magma folder? Did Drop++ unpack the drop tables into the Magma\Drop++\Tables folder? If it did, that means it read its config file.

I will talk to Dretax about what he does to prepare the builds he posts.
 

Jeffro

Member
Member
Sep 1, 2014
25
3
8
Did you mention what build you're using? Because I made those changes to the Data class, moving the config file handling into the MagmaPlugin and JintPlugin. I did that because loading plugin configs WASN'T working. So I have to wonder if somehow you got an intermediate build.

Did your build come with Drop++ in the Magma folder? Did Drop++ unpack the drop tables into the Magma\Drop++\Tables folder? If it did, that means it read its config file.

I will talk to Dretax about what he does to prepare the builds he posts.
The build did come with Drop++ (and did create all the tables), I had to go through ticket support Gameservers.com to get Fougerite installed, I did mention them to install 1.0.5 from this link: http://fougerite.com/resources/fougerite.2/ but I don't know if they did exactly that since I have no way of verifying which files are on there, I can only access /save and everything that is under that.

We're trying to develop a Rust server mod. Thanks for the problem report, but if user experience is more important to you, then you should use the stable release, or Magma.
I'm not afraid of bleeding edge builds as long as it doesn't break the server and we don't have a stable userbase yet (just me with 4 friends and like 2/3 friends of them) and we started 28th but wiped again on the 1st.
I actually even switched over from Oxide to Fougerite because I want more, at first my friends were like Oxide is doing way better but in my vision Fougerite is more stable and has probably the best Anticheat to date (maybe aside from the guy with the launcher).
It's just that if we lack certain plugins or stuff that hasn't been ported over I might have to try some of them myself or get someone interested enough to do it for us :)

I am happy to help with improving this build as well and am interested in maybe making plugins myself so you might see some work from me if I get good enough :)