@maxaki
What version of the plugin are you using? And have you restarted your server since the errors have been happening?
GUIAnnouncements
Moved
Total Downloads: 11,756 - First Release: Jul 13, 2015 - Last Update: Oct 20, 2017
- 5/5, 66 likes
-
Tried redownloading the plugin. Removed data files completely. Reset the config.
Now I tried adding it while the server was in starting phase. People got the error as soon as they joined the server.
Restarted multiple times.
We usually have around 80-150players online.
Have you tested teleporting i.e /home with plugin NTeleportation?
I have some more info here
Code:15:06 [Info] [Death Notes] A Wolf ☠ [Royal] Σrandan while sleeping. 15:06 [Error] Failed to call hook 'OnPlayerSleepEnded' on plugin 'GUIAnnouncements v1.6.24' (KeyNotFoundException: The given key was not present in the dictionary.) 15:06 [Debug] at System.Collections.Generic.Dictionary`2[System.UInt64,Oxide.Plugins.GUIAnnouncements+PlayerTimesJoined].get_Item (UInt64 key) [0x00000] in <filename unknown>:0 at Oxide.Plugins.GUIAnnouncements.OnPlayerSleepEnded (.BasePlayer player) [0x00000] in <filename unknown>:0 at Oxide.Plugins.GUIAnnouncements.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
Or respawn -
JoeSheep updated GUI Announcements with a new update entry:
1.6.25
@maxaki Can you try this update please and let me know how you get on? -
-
-
-
First, thanks for taking the time to make this plugin.
Trying to use new just new player announcements and welcome announcement. Welcome announcement displays but the new player ones do not.
Looking through the code, I see that in the function OnPlayerSleepEnded(), when WelcomeAnnouncement() is called, it will remove the current player ID from the JustJoined List<>. The problem is that JustJoined is checked again a bit further down in that function before displaying the new player announcements. The user it is checking for has already been removed by the welcome announcement function.
It also appears that the current player ID is only added to JustJoined if the welcome message is set to true so you can't have new player announcements without it.
I was going to patch it in my server but I thought I'd bring that to your attention. -
JoeSheep updated GUI Announcements with a new update entry:
1.8.27
-
The new player announcement doesn't work for me
-
-
i have the welcome message set to true
-
-
-
-
Code:void OnPlayerSleepEnded(BasePlayer player) { if (welcomeAnnouncement) { if (JustJoined.Contains(player.userID)) { WelcomeAnnouncement(player); <--Eventually calls LoadPrivateGUI() function that clears player.userID from JustJoined List } } if (newPlayerAnnouncements) { if (JustJoined.Contains(player.userID)) <--- This is always empty { if (storedData.PlayerData[player.userID].TimesJoined <= newPlayerAnnouncementsShowTimes) { if (welcomeAnnouncement) { timer.Once(welcomeAnnouncementDuration, () => NewPlayerAnnouncements(player)); } else { NewPlayerAnnouncements(player); } } } } }
I believe something like this would solve it:
Code:void OnPlayerSleepEnded(BasePlayer player) { if (JustJoined.Contains(player.userID)) { if (welcomeAnnouncement) { WelcomeAnnouncement(player); } if (newPlayerAnnouncements) { if (storedData.PlayerData[player.userID].TimesJoined <= newPlayerAnnouncementsShowTimes) { if (welcomeAnnouncement) { timer.Once(welcomeAnnouncementDuration, () => NewPlayerAnnouncements(player)); } else { NewPlayerAnnouncements(player); } } } } }
Last edited by a moderator: Jun 19, 2016 -
-
so i need to wait an update
-
-
@michelemarri
Trello <--- Dev build
Not tested thoroughly yet but your issue should be fixed. Lots of changes in this so would be a good idea to generate a new language, data (if it goes null) and config file. Might be nice if you could let it write on your current config file and see if anything goes weird or looks weird like duplicated settings etc and let me know.Last edited by a moderator: Jun 21, 2016 -
i've just uploaded your DEV build. New config & language. Seems not working at all