• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

missing native

Status
Not open for further replies.

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
The reason why you have to declare this native in the map header, is because it is not in the function list. The function list contains functions of common.j and Blizzard.j. Some natives that are in common.ai are very useful, but you have to declare them in the map header before using them.
I recommend reading the documentation about native declaration:
JassHelper 0.A.0.0
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
so im learning a bit of jass but i cannot find the native GetUnitGoldCost in the function list of JassNewgen.. some other natives are missing too like GetUnitBuildTime.
That is because there are no natives named that. Those are AI natives and in order to use them in the trigger script you need a modified native declaration file imported into your map.
 
Level 4
Joined
Jul 13, 2017
Messages
30
The reason why you have to declare this native in the map header, is because it is not in the function list. The function list contains functions of common.j and Blizzard.j. Some natives that are in common.ai are very useful, but you have to declare them in the map header before using them.
I recommend reading the documentation about native declaration:
JassHelper 0.A.0.0

thank you, i understand now. but im not very familiar with the natives in common.ai.. i guess i have to find it myself? it would be neat to have a list.
 
Status
Not open for further replies.
Top