tAPI Help with errors

MontezumaI

Spazmatism
Making my first mod, I ran into this issue when I ran tAPI

TAPI.Mods+LoadException: Terraria Comes Alive!.tapi: System.InvalidOperationException: An unexpected error has occurred.
at Microsoft.Xna.Framework.Graphics.Texture2D..ctor(GraphicsDevice graphicsDevice, Stream stream, Int32 width, Int32 height, XnaImageOperation operation)
at Microsoft.Xna.Framework.Graphics.Texture2D.FromStream(GraphicsDevice graphicsDevice, Stream stream)
at TAPI.Mod.<Load>b__0(BinBuffer bb)
at TAPI.Mods.HandleTapiModFile(FPath path, Action`1 action)
at TAPI.Mods.HandleModFile(FPath path, Action`1 action)
at TAPI.Mod.Load()
at TAPI.Mods.Load()
at TAPI.Mods.Load()

Help is greatly appreciated :D
 
When does this come up, also would be good if you could provide the sources. My TAPI experience is limited but error sounds quite vague.
 
When I open tAPI, or hit "Reload Mods" I get the error.

The only item in it is "Earth"
In Earth.json the code looks like this:

{
"displayName": "Earth Block",
"texture": "Items/Earth",
"size": [16,16],
"maxStack": 999,
"value": [0, 0, 0, 10],

"recipes":
[{
"items": {"Dirt Block": 1, "Stone Block": 1},
"tiles": ["Work Bench"],
"creates": 1
}]
}

It is connected to a 32x32 picture
Now that I look I see an issue...
 
Json size not matching pic's size does not usually cause errors. It is however clearly texture related. Is the texture a png file? Also you don't need to specify the texture's location if it is in the same folder as the json file and goes by the same name.
 
As far as I recall, every file in the folder is compiled and attempted to load into the game by the time you load the mod. That "New Bitmap Image" file might be interfering, as it is completely blank and TAPI might not be able to process it by the time of the mod's loading.
 
Testing.

EDIT: Thanks, this did work, I'm not sure where the bmp came after I deleted it on multiple accounts.
 
Back
Top Bottom