Closed Roopert83 closed 6 years ago
I have discovered the problem and have a fix for it. Authorblues broke the program because he's a content moderator and that's not defined in this project. I added it myself, compiled it and it now runs with no issues.
Here are the relevant sections of code in which I made changes to include Content Moderator:
User.cs
private static UserRole parseUserRole(string role)
{
switch (role)
{
case "banned":
return UserRole.Banned;
case "user":
return UserRole.User;
case "trusted":
return UserRole.Trusted;
case "moderator":
return UserRole.Moderator;
case "admin":
return UserRole.Admin;
case "programmer":
return UserRole.Programmer;
case "contentmoderator":
return UserRole.ContentModerator;
}
throw new ArgumentException("role");
}
UserRole.cs
namespace SpeedrunComSharp
{
public enum UserRole
{
Banned, User, Trusted, Moderator, Admin, Programmer, ContentModerator
}
}
I'm attempting to pull all five of the SMB1 leaderboards. I can pull four of them just fine, but I can't pull the one for the Warpless category.
The following does not work and gives me an "ArgumentException: role" error.
These all work for me: