Hq disband

When players run the command to disband they get stuck in that state.

when I tried to reload the plunging I got this error.

 

Failed to run a 30.00 timer in 'Headquarters v0.2.3' (InvalidOperationException: Collection was modified; enumeration operation may not execute.)
  at System.Collections.Generic.Dictionary`2+Enumerator[TKey,TValue].MoveNext () [0x00016] in <fb001e01371b4adca20013e0ac763896>:0

  at Oxide.Plugins.Headquarters.RemoveDisbanded () [0x000bf] in <b380fe7aa27c4aa1a5182a482239f901>:0

  at Oxide.Plugins.Headquarters.<OnServerInitialized>m__1 () [0x0003a] in <b380fe7aa27c4aa1a5182a482239f901>:0

  at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <bae5f1223fce49c493b01571c99dce02>:0



Failed to run a 30.00 timer in 'Headquarters v0.2.3' (InvalidOperationException: Collection was modified; enumeration operation may not execute.)
  at System.Collections.Generic.Dictionary`2+Enumerator[TKey,TValue].MoveNext () [0x00016] in <fb001e01371b4adca20013e0ac763896>:0

  at Oxide.Plugins.Headquarters.RemoveDisbanded () [0x000bf] in <b380fe7aa27c4aa1a5182a482239f901>:0

  at Oxide.Plugins.Headquarters.<OnServerInitialized>m__1 () [0x0003a] in <b380fe7aa27c4aa1a5182a482239f901>:0

  at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <bae5f1223fce49c493b01571c99dce02>:0

So I was on my test server to try and get to the bottom of this problem. I set the disband time to one hour. then I made an HQ and started the disband proses. I ran the command to disband two times to see what a player might see. then I edited the lang file to tell the player that it would take 1hr.
after that, I ran the disband command to see the changes. after the hour expired the HQ was gone as expected. so I made a new HQ with a different name. I was working on other plugins and found the error pop-up in my server console. if I had to guess the HQ plugin is not doing a check to see if the disband command has already been executed. my first thought was that every time the command was run the timer was reset. but something elts is happening. I have had players try to disband and the timer never expires. players in turn contact me to try and fix the problem. they might be attempting to run the disband command over and over to see if there are any changes.

in the past, I would unload the plugin and edit the data file but recently I discovered just reloading the plunging and giving it like 15 min will resolve the disband timer player is having.

please help a brother out.

hey Lizard, I think I know what's going on.  I will try to work on a fix today.

Merged post

@lizardmods please test the latest version.  It has a completely redone disbanding functionality (now it supports quitting too).  There is also a conquer mode which allows you to take over opposing headquarters (disabled by default but you can enable it and disable InvulnerableTCs to get it fully running).  This should address your concerns in another post.  Let me know how it goes.  I can't test with multiple headquarters because I'm testing locally.

Merged post

The build seems stuck on this site but you can get it directly in the repo: https://github.com/digital0iced0/headquarters

digital0iced0

hey Lizard, I think I know what's going on.  I will try to work on a fix today.

Merged post

@lizardmods please test the latest version.  It has a completely redone disbanding functionality (now it supports quitting too).  There is also a conquer mode which allows you to take over opposing headquarters (disabled by default but you can enable it and disable InvulnerableTCs to get it fully running).  This should address your concerns in another post.  Let me know how it goes.  I can't test with multiple headquarters because I'm testing locally.

Merged post

The build seems stuck on this site but you can get it directly in the repo: https://github.com/digital0iced0/headquarters

You can upload files manually by the way in the event GitHub sync is broken.

Thanks Wulf, I was able to get it working again by reinstalling the connection to the repo.

When running the /hq.disband command the chat prints out "Unknown command: hq.disband"

I have tried unloading the plugin, deleting the config data and lang, and then loading the plugin to see if that would fix the issue. but I got the same result.

I also tried using the /hq.quit command and the chat prints out "Your headquarter is still in the process of disbanding. Please try again later." 0_o this is even more confusing because there is no indication that is the case, ie no graded-out mapmaker or chat confirmation.

I have also tried the download from Umod and githug.

I've used the most recent Umod entry and also got the "Unknown command: hq.disband".  I then tested /hq.quit and didn't get any response from that (I'm the founder of the hq).  I then used hq.remove <playerid> from the console as admin and it removed the hq however left the marker in place.  hq.hide-markers now hides all other markers but leaves this one in place.  Is there a way to remove "disconnected" markers (as unloading the plugin also leaves this marker in place)?

Hmm thanks for the feedback.  This is not intended behavior. I will take a look.

Merged post

Hey guys, I uploaded a new version which I marked as 1.0.0.  I appologize for the weird behavior, its just there were some changes and its hard to keep track of everything.  With this update I tried to aim for clarity for the admin and players.  I changed the messages and the functionality to make all this more clear.  I also added a status command for the user and a few other admin commands. More details in the plugin page.  Please give that a shot and let me know.  Read the note about it requiring a reset of the data.  You may be able to salvage it if you do some text replacements though.  

@Zarius, unfortunately sometimes markers get "stuck" because these are in your local game.  The way it works is the server tells your local game to put a marker at some location.  However if you delete that marker in the server and issue some command which stops the server before it can let your computer know.  Your computer just leaves that marker there.  You could try to reconnect to the server and it should help.  

Yeah the marker did disappear after a while (I think after reconnecting).  Thanks for the update - I'll test out the new version later.