Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 服务器启动错误_C# - Fatal编程技术网

C# 服务器启动错误

C# 服务器启动错误,c#,C#,尝试添加purger计时器(游戏功能)时出现服务器启动错误,服务器似乎不允许访问 采购员: using System; using System.Threading; using System.Collections.Concurrent; using Plus.HabboHotel.GameClients; using Plus.HabboHotel.Rooms; namespace Plus.HabboHotel.Minigames.Purge { /// <summary

尝试添加purger计时器(游戏功能)时出现服务器启动错误,服务器似乎不允许访问

采购员:

using System;
using System.Threading;

using System.Collections.Concurrent;
using Plus.HabboHotel.GameClients;
using Plus.HabboHotel.Rooms;

namespace Plus.HabboHotel.Minigames.Purge
{
    /// <summary>
    /// This will do a countdown before the match starts
    /// </summary>
    public class PurgeTimer
    {
        /// <summary>
        /// Timer for our operation
        /// </summary>
        private Timer Timer;

        public bool On = false;

        /// <summary>
        /// Constructor
        /// </summary>
        public PurgeTimer()
        {
            // Method to call when completed
            TimerCallback TimerCallback = Ticked;

            // Create a new instance of timer
            Timer = new Timer(TimerCallback, null, 30000, Timeout.Infinite);
        }

        /// <summary>
        /// Method is call when timer is finished
        /// </summary>
        /// <param name="info">The information</param>
        public void Ticked(object info)
        {
            try
            {

                if (PurgeManager.Running)
                {
                    foreach (GameClient client in PlusEnvironment.GetGame().GetClientManager()._clients.Values)
                    {
                        try
                        {
                            if (client == null)
                            {
                                continue;
                            }

                            client.SendWhisper("[Automatic Event Alert]: The hotel is currently under Purge Mode. All crime is legal.");

                        }
                        catch (Exception e)
                        {

                        }
                    }

                    Timer.Change(30000, Timeout.Infinite);
                }
                else
                {

                    return;
                }
            }
            catch { }
        }
    }
}
错误:
当它不可接近时,我无法获取

首先,请将错误直接发布到问题中,而不是作为链接图像

错误
Plus.habbohote.GameClients.GameClientManager.\u客户端由于其保护级别而无法访问
似乎非常清楚。根据使用的命名约定,我猜测
\u客户机
集合是私有的。

这是您的问题

GameClientManager
类中,您试图访问一个私有字段

private ConcurrentDictionary<int, GameClient> _clients;
私有ConcurrentDictionary\u客户端;

有关问题的更多详细信息,请查看此

在此处发布错误消息,是。命名空间中定义的错误1元素不能显式声明为private、protected、,或受保护的内部C:\Users\BAB\Desktop\Boon Emu\HabboHotel\Minigames\Purge\PurgeManager.cs 10 18 Plus仿真程序错误2'Plus.HabboHotel.GameClients.GameClientManager.\u Client'由于其保护级别C:\Users\BAB\Desktop\Boon Emu\HabboHotel\Minigames\Purge\PurgeTimer.cs 45 96 Plus仿真程序无法访问,或关闭GameClientManagerTolong@devestation谢谢,那张桌子很有用!错误1命名空间中定义的元素不能显式声明为私有、受保护或受保护的内部C:\Users\BAB\Desktop\Boon Emu\HabboHotel\Minigames\Purge\PurgeManager.cs 10 18 Plus Emulator现在出现了!PurgeManager的代码是否完整?发布整个类这些类在一个文件中吗?与清除相关的所有内容都在这两个文件中。将这两个文件放在这里。完成,以便我们可以进一步帮助您。
private ConcurrentDictionary<int, GameClient> _clients;