also getting
functions until you restart the server then everything is lostCode:[Oxide] 11:37 AM [Error] [Clans] Clans: OnServerInitialized failed: Value is not a convertible object: System.Collections.Generic.Dictionary`2[System.String,System.Object] to System.String

Rust:IO Clans
Allows your players to form and manage clans with Rust:IO
Total Downloads: 43,596 - First Release: Mar 17, 2015 - Last Update: May 1, 2017
- 4.91489/5, 47 likes
-
Hi, same problem here
Code:> oxide.reload Clans [Oxide] 12:41 PM [Info] Unloaded plugin Clans v1.5.1 by playrust.io / dcode [Oxide] 12:41 PM [Info] Loaded plugin Clans v1.5.1 by playrust.io / dcode [Oxide] 12:41 PM [Error] [Clans] Clans: OnServerInitialized failed: Value is not a convertible object: System.Collections.Generic.Dictionary`2[System.String,System.Object] to System.String
-
Can one of you PM me the contents of oxide/data/rustio_clans.json before the error happened, and after the server has been stopped again?
-
dcode updated Rust:IO Clans with a new update entry:
1.5.1-1
-
Code:
[Oxide] 10:52 AM [Info] Clans was compiled successfully in 266ms [Oxide] 10:52 AM [Info] Loaded plugin Clans v1.5.0 by playrust.io / dcode [Oxide] 10:52 AM [Warning] Clans has replaced the clan chat command which was previously registered by RustIOClans [Oxide] 10:52 AM [Warning] Clans has replaced the c chat command which was previously registered by RustIOClans [Oxide] 10:52 AM [Error] Clans: OnServerInitialized failed (InvalidCastException: Value is not a convertible object: System.Collections.Generic.Dictionary`2[System.String,System.Object] to System.String) [Oxide] 10:52 AM [Debug] at System.Convert.ToType (System.Object value, System.Type conversionType, IFormatProvider provider, Boolean try_target_to_type) [0x00000] in <filename unknown>:0 at System.Convert.ChangeType (System.Object value, System.Type conversionType) [0x00000] in <filename unknown>:0 at Oxide.Core.Configuration.DynamicConfigFile.ConvertValue (System.Object value, System.Type destinationType) [0x00000] in <filename unknown>:0 at Oxide.Core.Configuration.DynamicConfigFile.ConvertValue[Dictionary`2] (System.Object value) [0x00000] in <filename unknown>:0 at Oxide.Core.Configuration.DynamicConfigFile.Get[Dictionary`2] (System.String[] path) [0x00000] in <filename unknown>:0 at Oxide.Plugins.Clans.OnServerInitialized () [0x00000] in <filename unknown>:0
Last edited by a moderator: Jun 5, 2015 -
Thanks, what does oxide/config/Clans.json contain in your case?
-
here it is
Attached Files:
-
-
dcode updated Rust:IO Clans with a new update entry:
1.5.2
-
worked like a charm, thanks!
-
Is there any way to toggle clan chat as default ? like when u push enter it writes "/c " automatic
-
Hi, not sure if this is me not understanding how to reference another plugin but when I use this:
Code:[ChatCommand("Headquarters")] void NewHeadquarters(BasePlayer player, string command, string[] args) { Puts(DebugPrefix+"Working"); string pClanTag = pClansAPI?.Call("GetClanOf",player) as string; var playersClan = pClansAPI?.Call("GetClan", pClanTag) as JObject; Puts(DebugPrefix+player.userID+":"+pClanTag); }
GetClanOf seems to be returning nothing, and no errors are being thrown and I am definitely in a group
EDIT: NM I fixed this its actually a thing that seems to have maybe changed? Functions that can be called from other plugins need to be private apparently, Its what I found with my plugin and changing them in Clans fixed it too so maybe they want to look at that?Last edited by a moderator: Jun 11, 2015 -
When you restart the server - lost clans
-
[Oxide] 6:11 PM [Info] Loaded plugin Clans v1.5.2 by playrust.io / dcode
[Oxide] 6:11 PM [Warning] Clans: oxide/config/Clans.json seems to contain an invalid 'messages' structure. Please delete the config file once and reload the plugin.
[DOUBLEPOST=1433607065][/DOUBLEPOST]Fixed it just delete config. -
~Disregard, works great!
-
How do you install this, I know how to install the .cfg files because they go in the plugins file, but how do you install .cs files?
-
Wulf Community Admin
-
Hey guys, is their way I can modify one of the files to change how the clan tag is shown. What I mean is, right now it would come up in chat as IE: [Wolf] Supramp ...
To fit our theme, I was wondering if we could make it come up like : Supramp of the house Wolf ...
if not, I understand, was just an idea.
Thanks guys. -
I tried to work with the "Clans" plugin and failed. Im just getting errors everytime.
What am I doing wrong? :c
Code:void cmdClanState(BasePlayer player, string cmd, string[] args) { [PluginReference("Clans")] Plugin Clans; JArray ClanList = Clans.Call("GetAllClans"); var clan = GetClan(args[0], player, "CLANS"); SendChatMessage(player, "CLANS", "Following Clan found:\n" + "Tag: "+ clan.tag+"\n" + "Owner: "+ clan.owner) }JObject GetClan(string searchedClan, BasePlayer executer, string prefix) { var targetClan = null; List<string> foundClans =new List<string>(); string searchedLower = searchedClan.ToLower(); foreach(var Clan in ClanList) { string display = Clan; string displayLower = display.ToLower(); if(!displayLower.Contains(searchedLower)) { continue; } if(displayLower.Contains(searchedLower)) { foundClans.Add(display); } } var matchingClans = foundClans.ToArray(); if(matchingClans.Length==0) { SendChatMessage(executer, prefix, "No matching clans found!"); } if(matchingClans.Length>1) { SendChatMessage(executer, prefix, "Multiple clans found:"); string multipleClans =""; foreach(string matchingclan in matchingClans) { if(multipleClans =="") { multipleClans ="<color=yellow>"+ matchingclan +"</color>"; continue; } if(multipleClans !="") { multipleClans = multipleClans +", "+"<color=yellow>"+ matchingclan +"</color>"; } } SendChatMessage(executer, prefix, multipleClans); } if(matchingClans.Length==1) { targetClan = Clans.Call("GetClan", matchingClans[0]); } return targetClan; }
Last edited by a moderator: Jun 17, 2015 -
-