| 08-04-2006, 11:54 PM | #1 |
I need to use some of the functions of the common ai, such as SetUpgrade, GetUpgradeGoldCost...just a few to make things work. How do I get them to work in my map without importing the whole bulge of common.ai functions? |
| 08-05-2006, 12:03 AM | #2 |
You will need to import a custom common.j into your map. For each common.ai native you need, copy its declaration in a new common.j line (preferably at the end of the file). Example: For GetUpgradeGoldCost use the following line. JASS:native GetUpgradeGoldCost takes integer id returns integer |
| 08-05-2006, 12:15 AM | #3 |
ok, thanks. JASS:native GetUpgradeGoldCost takes integer id returns integer native SetUpgrade takes integer id returns boolean native GetUpgradeLevel takes integer id returns integer I still get error messages when saving the map. |
| 08-05-2006, 12:37 AM | #4 |
I'm not sure what's wrong, but a few suggestions/questions... Does WE load an imported common.j? Did you import it as scripts\common.j? Have tried saving your common.j in a scripts folder in your Warcraft 3 folder? Does importing into an mpq work? |
| 08-05-2006, 01:27 AM | #5 |
Save your map then reopen it again so that WE can store the new common.j in memory and do not report script errors. |
| 08-05-2006, 01:31 AM | #6 |
I was never able to figure if custom common.j has problems in multiplayer |
