Lord Yharim
Terrarian
I am making a mod with VS, and I have all of the references and such set up, and I watched a video and followed all of the instructions, but no matter what I try, It says all of my code is bad. PLEASE HELP.
Here is a screenshot from VS. As you can see, all of my code is underlined in red. And here is the message I get when I try to load it in game.Can you post a screenshot of the error you are getting in tmodloader when you try to build your mod?
public override void SetStaticDefaults() {
DisplayName.SetDefault("Item Name");
Tooltip.SetDefault("Item Tooltip");
}
Thanks so much. Also, After I create the mod skeleton, how do I use visual studio to make the rest of the mod?The second picture tells you the issue is on line 13.
You're trying to set item.name, but that's not how you set the name
You set the name using another method
C#:public override void SetStaticDefaults() { DisplayName.SetDefault("Item Name"); Tooltip.SetDefault("Item Tooltip"); }
The reason everything is red in your VS is because you didn't set up all the references properly.
I find it best to create the mod skeleton using the options in tModLoader and then leave the mod in the folder it gets created in. That way all the references are already handled by tModLoader