- Joined
- Aug 7, 2013
- Messages
- 1,338
Hi,
EDIT: Solved--it's because Warcraft actually starts ability levels at "1" and not "0." Nothing to do with channel. Odd that I only started indexing at "0" for channel, but all the other thousands of abilities were correctly started at "1." Still would like to know why it gets read as 'Cool'.
So I've been getting this error from the editor when saving the map after re-loading it from having generated objects from the Lua scripts.
Referencing unknown database field: 'Cool' (Units\AbilityData)
Since it was referring to a unit field, I first thought it was one of my units throwing the error. But in fact, after an exhausting binary search, it turned out an ability object was throwing the error! So now I learned one thing: the error WC3 throws has nothing to do with the type of the object, except that it's probably not whatever that field usually belongs to.
The line in the ability which causes the error is the third line in this block of code:
The third line is suppose to set the cooldown for the channel based ability to 0.00 for the first level. This line works for any other ability (e.g. one based on heal, holy light, frost nova, etc.). But it fails for the ability based on 'ANcl' (Channel).
I am guessing this is a typo for whoever did the lua object merger.
So two questions:
1. Why does this makechange(current, "acdn", "0", "0.00") translate to writing to a field called "Cool" that apparently belongs to Units\abilitydata ?
2. How do I write to a channel ability's cooldown if I can't use "acdn," which is how that field is named (true for all other spells too)?
EDIT: Solved--it's because Warcraft actually starts ability levels at "1" and not "0." Nothing to do with channel. Odd that I only started indexing at "0" for channel, but all the other thousands of abilities were correctly started at "1." Still would like to know why it gets read as 'Cool'.
So I've been getting this error from the editor when saving the map after re-loading it from having generated objects from the Lua scripts.
Referencing unknown database field: 'Cool' (Units\AbilityData)
Since it was referring to a unit field, I first thought it was one of my units throwing the error. But in fact, after an exhausting binary search, it turned out an ability object was throwing the error! So now I learned one thing: the error WC3 throws has nothing to do with the type of the object, except that it's probably not whatever that field usually belongs to.
The line in the ability which causes the error is the third line in this block of code:
JASS:
//! i setobjecttype("abilities")
//! i createobject("ANcl", "Amve")
//the line below causes the error
//! i makechange(current, "acdn", "0", "0.00")
The third line is suppose to set the cooldown for the channel based ability to 0.00 for the first level. This line works for any other ability (e.g. one based on heal, holy light, frost nova, etc.). But it fails for the ability based on 'ANcl' (Channel).
I am guessing this is a typo for whoever did the lua object merger.
So two questions:
1. Why does this makechange(current, "acdn", "0", "0.00") translate to writing to a field called "Cool" that apparently belongs to Units\abilitydata ?
2. How do I write to a channel ability's cooldown if I can't use "acdn," which is how that field is named (true for all other spells too)?
Last edited by a moderator: