I keep getting this error, along with the one under.Code:using System.Collections.Generic; using System; using System.Reflection; using System.Data; using UnityEngine; using Oxide.Core; using Oxide.Core.Configuration; using Oxide.Core.Plugins;namespace Oxide.Plugins { [Info("NameRewards", "Kappasaurus", "1.0.0")] [Description("Give players permissions based on phrases in their name.")] class NameRewards : RustPlugin { string Perm = Config["PermName"].ToString(); string Phrase = Config["NamePhrase"].ToString(); void OnPlayerInit(BasePlayer player) { if (BasePlayer.displayName.Contains(Phrase)) { permission.GrantUserPermission(player.UserIDString, Perm, this); } else { permission.RevokeUserPermission(player.UserIDString, Perm, this); } } protected override void LoadDefaultConfig() { PrintWarning("Generating your config file!"); Config.Clear(); Config["NamePhrase"] = ""; Config["PermName"] = ""; SaveConfig(); } } }
![]()
![]()
Can anyone spot the cause of the errors?
Errors assigning config to variables
Discussion in 'Rust Development' started by Kappasaurus, Oct 5, 2016.
