Coding Help!

Roka Josh

Skeletron Prime
Can any body help me with this?
Missing texture ModRaria/Items/SteelIngot
at Terraria.ModLoader.ModLoader.GetTexture(String name)
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)

I have tried defining the texture manually but it came up with Ilist being incorrect and needing to define a type!
Send help please!
 
hmmm... It's hard to tell whats happening without being able to see the folders. are you sure the directory you gave it was correct?
 
Yes I know but I deleted it (moved it to another folder outside the mod) and it came up with the same problem with the paxel
 
Here! The text pieces are SteelIngot.cs and Mod-Raria.cs (the info file).
Code:
SteelIngot.cs :

using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;

namespace ModRaria.Items {
public class SteelIngot : ModItem
{
    public override void SetDefaults()
    {
        item.name = "Steel Ingot";
        item.toolTip = "The very basis of modern technology.";
        item.toolTip2 = "There are many things that can be done with this useful ingot!";
        item.width = 30;
        item.height = 24;
        item.rare = 1;
        item.value = 10000;
    }

    public override void AddRecipes()
    {
        ModRecipe recipe = new ModRecipe(mod);
        recipe.AddIngredient(null, "Iron Ore", 3);
        recipe.AddTile(null, "Furnace");
        recipe.AddTile(null, "Anvil");
        recipe.SetResult(this);
        recipe.AddRecipe();
    }
}}



Mod-Raria.cs :

using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace ModRaria {
public class ModRaria : Mod
{
    public override void SetModInfo(out string name, ref ModProperties properties)
    {
        name = "Mod-Raria!";
        properties.Autoload = true;
    }
}}
 
First off you need another using thing: using Terraria.ID;
you also need to change the ingredients to recipe.AddTile(TileID.Furnace);
recipe.AddIngredient(ItemID.IronOre, 3);
also what is that "null" doing there?
make sure the dimensions you specified are correct
and the texture problem is with your file names, make sure they are named correctly as that is the thing that appears to be causing the issue.
Are you using the current version of TML also?
 
Im using the new version of tml, the files are named the same, and Ill change the code and tell you what happens. Thanks for helping at the moment!
 
The problem isn't with the code (anymore) it's the textures, something i can't help you with without being able to see the files, and i also need to go to bed. try asking someone on the TML thread.
 
Ok thanks!
[DOUBLEPOST=1440500157,1440499715][/DOUBLEPOST]Im sorry, but it says
Mod-Raria\Items\Ingots\SteelIngot.cs(25,25) : error CS0117: 'Terraria.ID.TileID' does not contain a definition for 'Furnace'
 
This is the structure of my folders, just in spoilers :
SteelPaxel.cs
SteelSword.cs
SteelPaxel.png
SteelSword.png
SteelIngot.cs
SteelIngot.png
[DOUBLEPOST=1440500838,1440500792][/DOUBLEPOST]By having individual folders in the item folder, have I mis-defined the code/texture's location?
 
Back
Top Bottom