Error while compiling: Authentication.cs(416,58): error CS0039: Cannot convert type `ListHashSet<BasePlayer>' to `System.Collections.Generic.List<BasePlayer>' via a built-in conversion
Cannot convert type `ListHashSet<BasePlayer>' to `System.Collections.Generic.List<BasePlayer>'Fixed
@shinnyanko
Edit the file as below. I have confirmed this allows it to compile, and continue to function.
Add this to line 3:
Replace Line 414
Merged post
Update. Verified by the players that this does fix the problem.
Edit the file as below. I have confirmed this allows it to compile, and continue to function.
Add this to line 3:
using System.Linq;Replace Line 414
List<BasePlayer> online = BasePlayer.activePlayerList as List<BasePlayer>;With this:
List<BasePlayer> online = BasePlayer.activePlayerList.ToList() as List<BasePlayer>;Merged post
Update. Verified by the players that this does fix the problem.
Dateranoth@shinnyanko
Edit the file as below. I have confirmed this allows it to compile, and continue to function.
With this:List<BasePlayer> online = BasePlayer.activePlayerList.ToList() as List<BasePlayer>;
That's a lot more handling than you need.
ListHashSet<BasePlayer> online = BasePlayer.activePlayerList;
Wulf
That's a lot more handling than you need.
ListHashSet<BasePlayer> online = BasePlayer.activePlayerList;
Thanks for the simplification Wulf. I swear I tried that last night and it didn't work, but I obviously mis-typed or something. lol. Oh well, drinks and google search add up to bad code.
Thanks again.
Locked automatically