Error

Discussion in 'Released Mods' started by DarooPL, Jan 24, 2013.

  1. DarooPL

    DarooPL Green Slime

    Hi all. I have problem with my mod. When mod has been loaded, show me error:
    Error: The given key was not present in the dictionary

    I update mod and i have this problem. Help me with this error.

    example .ini files in NPC folder:
    [Stats]
    npcSlots=1
    frameCount=4
    animationType=28
    width=59
    height=40
    type=-1
    aiStyle=3
    timeLeft=105000
    damage=75
    defense=30
    soundHit=1
    soundKilled=1
    lifeMax=10000
    scale=1
    value=1000
    [Drops]
    1-5 Demon Dust=50
    1-5 Red Piece=50
    1 Battle Stone=100

    2)[Stats]
    npcSlots=1
    frameCount=2
    animationType=28
    width=59
    height=40
    type=-1
    aiStyle=22
    timeLeft=105000
    damage=80
    defense=23
    soundHit=1
    soundKilled=1
    lifeMax=25000
    scale=1
    value=1000
    [Drops]
    1-5 Green Piece=50
    3 Mandrake=100
    and .cs file
    public static bool SpawnNPC(int x, int y, int playerID) {

    if (!Main.player[playerID].zoneDungeon //not in dungeon. Note that the ! means "Not"
    && !Main.player[playerID].zoneJungle //not in jungle
    && !Main.player[playerID].zoneMeteor //not in meteor
    && (Main.player[playerID].position.X < (Main.worldSurface * 10.0)//Spawns on the left edge of the map
    || Main.player[playerID].position.X > (Main.worldSurface * 190.0))
    //or right edge
    && Main.player[playerID].position.Y < (Main.rockLayer * 35.0)// just above the underworld. The underworld ends at *42~
    && Main.rand.Next(8)==1){ //1 out of 8 chance of spawning
    return true;
    }
    return false;
    }

    Now i just have problem with chest yet.

    .ini from Tile folder
    [Stats]
    id=-1
    Width=2
    Height=2
    pick=0
    axe=0
    hammer=1
    DropName=Backpack Holding
    Lighted=False
    MergeDirt=False
    Cut=False
    Alch=False
    Shine=1150
    Shine2=True
    Stone=False
    WaterDeath=False
    LavaDeath=False
    Table=False
    BlockLight=True
    NoSunLight=True
    Dungeon=False
    SolidTop=False
    Solid=False
    NoAttach=False
    NoFail=False
    FrameImportant=True

    and .ini for Item folder:
    [Stats]
    width=250
    height=25
    useStyle=1
    useAnimation=15
    useTime=100
    maxStack=250
    consumable=True
    autoReuse=True
    useTurn=True
    scale=1
    [Recipe]
    Water=False
    Amount=1
    Items=25 Wood,25 Stone Block
    Tiles=Work Bench
     
  2. guyguyga

    guyguyga Slimed Zombie

    Did you make those items yet? If not, then that's your problem. The so called "dictionary" is just a list of all items in terraria. Just make those items and they will automatically be added to the dictionary.
     

Share This Page