• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] Referencing unknown database field

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,338
Hi,

Keep getting this error popping up. The map runs fine and there's no crashes or anything weird. What's going in here?

j5z7uq.png
 
Level 15
Joined
Aug 7, 2013
Messages
1,338
Edit/Update: Ok I fixed this error. Apparently the LUA object generation decides that the first level of an ability, etc. is level "1" and not level "0." So basically I guess I was writing to the 0th level (an invalid field?), and somehow the editor preserved the value / knowledge that this field was attempted to be edited. That's my hypothesis, because this error went away when I fixed that. But for the life of me I have yet another error, this time it's DataB -- "Units\AbilityData." I fixed all my level errors, but still don't know what's going wrong here.

Here is my LUA script, is there anything wrong with it?

JASS:
//! externalblock extension=lua ObjectMerger $FILENAME$
    //attack speed  - 7 levels
    //! i AA_LVLS = 6
    //mana - 9 levels
    //! i MANA_LVLS = 9
    //attack speed base ability
    //! i AA_ID = "AIsx"
    //mana base ability
    //! i AM_ID = "AImz"
    //spell resistance ability
    //! i AS_ID = "AIsr"
    //damage ability / item base id
    //! i AD_ID = "AIaa"
    //health ability / item base id
    //! i AH_ID = "AImh"
    //! i I_ID = "manh"
    //spell resistance has 100 levels, each increasing by .01
    //! i SP_LVLS = 100
    //prefixes for the custom object names
    //attack speed - ability
    //! i AA_PREFIX = "AA"
    //mana - ability
    //! i AM_PREFIX = "AM"
    //spell resistance - ability
    //! i AS_PREFIX = "AS"
    //damage - item / ability
    //! i AD_PREFIX = "AD"
    //! i ID_PREFIX = "ID"
    //health - item / ability
    //! i AH_PREFIX = "AH"
    //! i IH_PREFIX = "IH"
    
    //****************
    // Attack Speed (AA)
    //****************
    //! i for i = 0, AA_LVLS do
        //! i setobjecttype("abilities")
        //! i createobject(AA_ID, AA_PREFIX .. "0" .. i)
        //set the attack speed increasing: .01, .02, .04, .., 2^n / 100
        //! i makechange(current, "Isx1", "1", "" .. (math.pow(2, i) / 100))
        //! i makechange(current, "aite", "0")
        //! i makechange(current, "ansf", "(Attribute)")
        //! i makechange(current, "anam", "Attack Speed " .. i)
    //! i end
    
    //****************
    // Mana (AM)
    //****************
    //! i for i = 0, MANA_LVLS do
        //! i setobjecttype("abilities")
        //! i createobject(AM_ID, AM_PREFIX .. "0" .. i)
        //set the mana increasing by: 1, 2, 4, .., 2^n
        //! i makechange(current, "Iman", "1", "" .. math.pow(2, i))
        //! i makechange(current, "aite", "0")
        //! i makechange(current, "ansf", "(Attribute)")
        //! i makechange(current, "anam", "Mana " .. i)
        //! i makechange(current, "aart", "ReplaceableTextures\\CommandButtons\\BTNPendantOfMana.blp")
    //! i end

    //****************
    // Spell Resistance (AS)
    //****************
    //! i setobjecttype("abilities")
    //! i createobject(AS_ID, AS_PREFIX .. "00")
    //! i makechange(current, "alev", SP_LVLS)
    //! i makechange(current, "aite", "0")
    //! i makechange(current, "ansf", "(Attribute)")
    //! i makechange(current, "anam", "Spell Resistance")
    //! i for i = 0, SP_LVLS do
        //set the spell resistance increasing: .01, .02, .03, .04, .., 1.0
        //! i makechange(current, "isr2", i, "" .. (i / 100))
    //! i end

    //****************
    // Damage (ability + item)
    //****************
    //! i setobjecttype("abilities")
    //! i createobject(AD_ID, AD_PREFIX .. "00")
    //! i makechange(current, "aite", "0")
    //! i makechange(current, "ansf", "(Attribute)")
    //! i makechange(current, "anam", "Attack")
    //! i makechange(current, "Iaa1", "1", "1")
    //make the item now
    //! i setobjecttype("items")
    //! i createobject(I_ID, ID_PREFIX .. "00")
    //! i makechange(current, "iabi", AS_PREFIX .. "00")
    ////! i makechange(current, "ansf", "(Attribute)")
    //! i makechange(current, "unam", "Attack Tome")

    //****************
    // health (ability + item)
    //****************
    //! i setobjecttype("abilities")
    //! i createobject(AH_ID, AH_PREFIX .. "00")
    //! i makechange(current, "aite", "0")
    //! i makechange(current, "ansf", "(Attribute)")
    //! i makechange(current, "anam", "Health")
    //! i makechange(current, "Ilif", "1", "1")
    //make the item now
    //! i setobjecttype("items")
    //! i createobject(I_ID, IH_PREFIX .. "00")
    //! i makechange(current, "iabi", AH_PREFIX .. "00")
    ////! i makechange(current, "ansf", "(Attribute)")
    //! i makechange(current, "unam", "Health Tome")
//! endexternalblock

I'm just using LUA script to make abilities.

I make an ability via the script, and then I reference that ability in another script (temporally following it) to be added to a unit.

This works--the unit gets the ability and everything is fine.

Just not sure why it keeps throwing the damn error. I've checked all the "uabi" (Data A) fields of my custom units, and they are all correct. And there's no other units that I modified, so I'm a bit lost at what's going on.

This is on a clean map by the way (as in it's from scratch as I'm just writing out the custom units/abilities/items, etc.). So I've been using JNPG.
 
Last edited:
Status
Not open for further replies.
Top