Wren359
Newcomer
Hi everyone! I've been playing for a while and thought I'd try modding. I've been following the Modder Guide: Getting Started, and I think I have everything in order, but I keep getting the error from SMAPI "These mods could not be loaded into your game. - SalsFirstMod 1.0.0 Because its DLL has no 'Mod' subclass." I'll include some stuff here, but I made a post on Stack Overflow that has more details if you would like, including my full code and what troubleshooting I've done :)
The most relevant part of my code:
using System;
using Microsoft.Xna.Framework;
using StardewModdingAPI;
using StardewModdingAPI.Events;
using StardewModdingAPI.Utilities;
using StardewValley;
namespace SalsFirstMod {
public class ModEntry : Mod {
// Public Methods
// Mod entry point
public override void Entry(IModHelper helper)
{
helper.Events.Input.ButtonPressed += this.OnButtonPressed;
}
ModEntry inherits from Mod, so I'm not quite sure what the issue is. All of the code should be the same as in the tutorial anyhow, but the rest is in the Stack Overflow post. I'll attach my SMAPI log. Thanks everyone :)
The most relevant part of my code:
using System;
using Microsoft.Xna.Framework;
using StardewModdingAPI;
using StardewModdingAPI.Events;
using StardewModdingAPI.Utilities;
using StardewValley;
namespace SalsFirstMod {
public class ModEntry : Mod {
// Public Methods
// Mod entry point
public override void Entry(IModHelper helper)
{
helper.Events.Input.ButtonPressed += this.OnButtonPressed;
}
ModEntry inherits from Mod, so I'm not quite sure what the issue is. All of the code should be the same as in the tutorial anyhow, but the rest is in the Stack Overflow post. I'll attach my SMAPI log. Thanks everyone :)
Attachments
-
1.9 KB Views: 65
Last edited: