| 03-31-2007, 03:49 PM | #1 |
I tried to use JASS:native GetUnitGoldCost takes integer unitid returns integer Why i need it? It's pretty simple, i make a map where you control a unit which you buy and when you buy another unit you'll get 1/2 of the price of your old unit back. I could also make a build around but i'm too lazy to insert every unit-type to get the Gold Cost of that unit. |
| 03-31-2007, 03:56 PM | #2 |
That native is in common.ai not common.j so as far as the game is concerned for your jass, it doesn't exist (normally). However, it does happen to be one of the common.ai natives that can be imported. So what you do is extract common.j from your wc3 mpq, add that line to the bottom and import your modified common.j into your map (path would be 'Scripts\common.j'). Comment out all uses of the function in your map and save it. Then close WE, reopen it and open your map. You should then be able to use the function without problems. |
| 03-31-2007, 07:18 PM | #3 |
Alright thank you very much, you'll be rep'ed if it works. ---Edit--- Tried it and now WE say me the entire triggers are wrong, when i remove the imported common.j it's working normally (well, the 1 error with the native) |
