Error In tModLoader that no one can help fix.

wait.... did they really get cleared

NOO!O!O!O!OO!O!O! wait i just moved em, gotta post a new one :p


wait... my files are location dependent.....


welp shiiit
 
*Somehow, a :red:ty Undertale fan helped...


Okay got it! Took a while to copy+paste my code, but it's done!
 

Attachments

  • LivenUP.zip
    7 KB · Views: 110
*Somehow, a :red:ty Undertale fan helped...

I'm not sure what someone being an undertale fan had to do with any of this, but referring to someone as a ":red:ty Undertale fan" is rude and not appreciated on this forum. Please refrain from doing so again.
 
The files are location dependant.
I really don't know what you mean by this. If you are talking symbolic links or things like that, don't do that, but I doubt that's it. I've posted zip files with .cs files on this forum all the time.
 
Hmm... I think I MAY know the problem. I may not be saving, even though it gives no save prompt in the file. Also Jeckel, the :red:ty undertale fan was me. I may actually have to switch my code editor. :p
 
How do I paste code?
[doublepost=1470867471,1470867408][/doublepost]Aaaand theres the battery file, if you needed it. My class is:
upload_2016-8-10_17-17-50.png
 

Attachments

  • upload_2016-8-10_17-15-37.png
    upload_2016-8-10_17-15-37.png
    74.1 KB · Views: 106
Alright, so I am new to coding. And I mean NEW. And I think a found a bug that no one can shed light on, except jopojelly, who said it was a syntax error. I'm going to include an example of one of my items, and I'm just wondering if anyone has had it to where nothing shows up as items (not loaded in the game at all! I even checked with HERO's mod, nothing). My example of code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace LivenUP.Items.Materials
{
public class Battery : ModItem
{
public override void SetDefaults()
{
item.name = "Battery";
item.width = 20;
item.height = 16;
item.maxStack = 999;
item.toolTip = "Waterproof, yet somewhat cheap";
item.toolTip2 = "'Suprisingly, these can cook hot dogs!'";
item.value = 10000;
item.rare = 2;
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(null, PureEnergy, 1); // this should be "recipe.AddIngredient(null, "PureEnergy", 1);"
recipe.AddRecipeGroup(Terraria.ID.ItemID.GoldBars, 1);
recipe.AddRecipeGroup(Terraria.ID.ItemID.IronBars, 1);
recipe.AddTile(Terraria.ID.TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe(null, CircutBoard)
}
}
}

Thanks!
 
WTF? Thought I fixed it. ;-;
Anyways, I don't think it saves... Weeeeeelp, godamnit.
[doublepost=1470960616,1470960514][/doublepost]in my code, it's in quotes. what is going on?!?!?!
 
K, well, first off, go download Visual Studio. The errors are all syntax errors, and it's not fun going to help someone and discovering that all the errors are just things the computer is already telling them exactly how to fix.

ay9QIYZ.png

Clay doesn't exist, look that up, why are you calling AddRecipe 2 times there and with the wrong arguments, go look in the tmodloader documentation and examples. Also, not ending a statement with a ; is no good.

AJup0Mc.png

Again, the ;. Also, those aren't Recipe Groups. Go look them up.

gJZCo8m.png

Same same same.

SccB0ws.png

More missing ;.

3dl5wui.png

A ; right after the method declaration will mess up everything

TjytiYx.png

More of the same.

Anyway, go download Visual Studio.
 
Well as I said I don't do well with code. And thanks for helping me so far. You and Mr Terraria are gonna be "helpers" for the mod, linked, and soandso. And the clay error makes me feel so :red:ing dumb :p
 
Back
Top Bottom