c# - Server startup error -
server start error when trying add purger timer ( game feature) seems server not allowed access?
purgetimer:
using system; using system.threading; using system.collections.concurrent; using plus.habbohotel.gameclients; using plus.habbohotel.rooms; namespace plus.habbohotel.minigames.purge { /// <summary> /// countdown before match starts /// </summary> public class purgetimer { /// <summary> /// timer our operation /// </summary> private timer timer; public bool on = false; /// <summary> /// constructor /// </summary> public purgetimer() { // method call when completed timercallback timercallback = ticked; // create new instance of timer timer = new timer(timercallback, null, 30000, timeout.infinite); } /// <summary> /// method call when timer 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]: hotel under purge mode. crime legal."); } catch (exception e) { } } timer.change(30000, timeout.infinite); } else { return; } } catch { } } } }
purgemanager:
using system; using system.collections.generic; using system.linq; using system.text; using plus.habbohotel.minigames.purge; using system.threading.tasks; namespace plus.habbohotel.minigames.purge { public class purgemanager { public static purgetimer maintimer; public static bool running; } }
error: http://prntscr.com/9ss0qb don't while it's not accessible!
firstly, please post error directly question, not linked image.
the error plus.habbohotel.gameclients.gameclientmanager._clients inaccessible due protection level
seems pretty clear. naming convention used i'd take guess _clients
collection private.
Comments
Post a Comment