PLEASE HELP

please help when i build the mod this error shows up
please help

Terraria 1.2.4.1, tAPI Builder r14a

========================================

LitJson.JsonException: ModInfo Error: The given key was not present in the dictionary. ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at tAPI_Builder.MainWindow.<>c__DisplayClass8.<BtnBuild_Click>b__0()
--- End of inner exception stack trace ---
at tAPI_Builder.MainWindow.<>c__DisplayClass8.<BtnBuild_Click>b__0()
 
If you ever ask for help with code, you need to give more info. A generic exception is hard to help unless its a very common problem stemming form the same source for many people. When reading exceptions, the first part is usually the most accurate and important bit. Here it says the code tried to access a key in a dictionary that wasn't there. So either don't try to use that key, or define the key inside the dictionary.
 
please help i get an error heres the error

Terraria 1.2.4.1, tAPI Builder r14a

========================================
Building mod Random Mod

Validating Jsons...
BubbleGunop.json: Invalid JSON file.
Invalid token '' in input string
Failed to build Random Mod.

========================================

Built 0 mods.


and heres my code

{
"displayName": "Bubble Shooter",
"size": [64, 64],
"maxStack": 1,
"value": [0, 0, 270, 40],
"rare": 3,
"useStyle": 5,
"useAnimation": 10,
"useTime": 5,
"useSound": 13,
"damage": 112,
"knockback": 13,
"autoReuse": true,
"noMelee": true,
"shoot": "InternalModName:Bubble",
"shootspeed" 14,
"magic": true,
"mana" 13,

"recipes":
[{
"items": { "Bubble Gun": 1, "Chlorophyte Bar": 15, "Illegal Gun Parts": 1 },
"tiles": [ "Anvil" ],
"creates": 1
}]
}
 
Invalid Token USUALLY means the program is reading in input and there was something in it that it couldn't handle. In your case it say the invalid token was ", which probably means you used quotation marks somewhere you shouldn't have. (This is just a guess due to the error message, I dont actively use tAPI)
 
One of your lines is:
"shootspeed" 14,

When it should be:
"shootSpeed": 14,
Indeed that is one flaw in that json file, another error of the same type is on the "mana" line.

Whenever you get an invalid token error it means you wrote your json file badly in a way that it cannot be properly read by the parser.
An easy way to see your issues is to take it to a json validator such as http://jsonlint.com/ and let it display the problem clearly.
 
Indeed that is one flaw in that json file, another error of the same type is on the "mana" line.

Whenever you get an invalid token error it means you wrote your json file badly in a way that it cannot be properly read by the parser.
An easy way to see your issues is to take it to a json validator such as http://jsonlint.com/ and let it display the problem clearly.
thanks
 
Indeed that is one flaw in that json file, another error of the same type is on the "mana" line.

Whenever you get an invalid token error it means you wrote your json file badly in a way that it cannot be properly read by the parser.
An easy way to see your issues is to take it to a json validator such as http://jsonlint.com/ and let it display the problem clearly.
Do you know of a program that can do something like this for .cs files?
As in, make a possible error easier to notice.
 
Most IDE's catch errors, put if it compiles and is still buggy, that is going to be a painful process. Visual Studio is probably the best IDE for C# though. The free versions is called the "express version" I believe
 
Most IDE's catch errors, put if it compiles and is still buggy, that is going to be a painful process. Visual Studio is probably the best IDE for C# though. The free versions is called the "express version" I believe
I'm using Visual Studio 2013 Community Edition, which came out last November. Here's a Microsoft blog post describing the two major differences between Community and Express:

http://blogs.msdn.com/b/onecode/arc...o-community-edition-and-express-editions.aspx

If that's tl;dr here's the precis. Community lets you use IDE plug-ins, Express doesn't. Express is available in versions to target various platforms (Web, Windows, etc.), Community is cross-platform so you get them all.

Yay, I got through a post about Visual Studio without saying "of course, Delphi is much better" even once!

…oops. (Delphi is of no use when dealing with Terraria, it's just that promoting it is practically a reflex with me. Sorry 'bout that.)
 
please help!
i made a magic weapon and it wont shoot!
it makes the correct sound and uses mana but wont shoot!
heres my code of weapon

{
"displayName": "Bubble Shooter",
"size": [64, 64],
"maxStack": 1,
"value": [0, 0, 270, 40],
"rare": 3,
"useStyle": 5,
"useAnimation": 10,
"useTime": 5,
"useSound": 13,
"damage": 112,
"knockback": 13,
"autoReuse": true,
"noMelee": true,
"shoot": "MPT:Bubble",
"shootSpeed": 14,
"magic": true,
"mana": 13,

"recipes":
[{
"items": { "Bubble Gun": 1, "Chlorophyte Bar": 15, "Illegal Gun Parts": 1 },
"tiles": [ "Anvil" ],
"creates": 1
}]
}

and heres my projectile

{
"displayName": "Bubble",
"size": [32, 32],
"aiStyle": 0,
"timeLeft": 3600,
"friendly": true,
"hostile": false,
"tileCollide": true,
"damage": 32,
"magic": true


please help
 
please help when i load a world or reload mods this error shows up

TAPI.Mods+LoadException: Random Mod.tapi: TAPI.Mods+LoadException: Json "JsonData object" Missing default texture: Items/JetPak_Wings
at TAPI.ModJsonHandler.PropTexture(JsonData j, String key, IDictionary`2 dict, String defaultKey)
at TAPI.ModJsonHandler.HandleItem(ModBase modBase, JsonData j, String fname)
at TAPI.ModJsonHandler.Handle(ModBase modBase)
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()

and heres my code

{
"displayName": "Hell Jet",
"size": [64,64],
"maxStack": 1,
"value": [3,0,16,400],
"rare": 8,
"tooltip": "A devil jetpack",
"accessory": true,
"wings": true,
"wingTime": 999,

"recipes":
[{
"items": { "Dirt Block": 1 },
"tiles": [ "Work Bench" ],
"creates" : 1
}]
}
please help
my texture is same name as file
jsonlint said its fine
 
Back
Top Bottom