| 01-22-2009, 04:18 PM | #1 |
First i want it able to work for all and on battle.net (so don't talk about japi) I've read that is possible, but i don't know how to make it. I tried to add this line JASS:native function GetUnitGoldCost takes integer unitid returns integer I've also tried to remove the word "native". But i can't save the map without any error, even if i don't try to use the function GetUnitGoldCost in the map. Could you explain plz how i can make it and/or attach a demo map ? |
| 01-22-2009, 05:10 PM | #2 |
You can't. We have a GetUnitGoldCost script in our database (I think) if you want it for units (as opposed to structures). Structures are a bit trickier, but there's one for that in the database too (mine actually) that needs someone to try and build it first, but meh. |
| 01-22-2009, 05:12 PM | #3 |
how should that work ? only natives hardcoded in warcraft III (dlls and executables) can be used ....japi extends this functionality by injecting additional hardcoded natives in warcraft executable ... |
| 01-22-2009, 05:21 PM | #4 |
http://www.wc3campaigns.net/showthre...etUnitGoldCost So what it was only a theory, or we were able to do it on 2006 but not anymore now ? Or i missunderstand something ? |
| 01-22-2009, 05:50 PM | #5 | |
oh yes ...ai commands nice ... however most ov them dont work ...seems like that Getunitgoldcost stopped working some patches ago ..huh ?! (doesnt work with 1.21 either) but i already found one native that works...blah sure there are more Quote:
|
| 01-22-2009, 05:52 PM | #6 | |
Quote:
|
| 01-22-2009, 05:59 PM | #7 | |
as you have done it aswell ... Quote:
import it ...save... then change path to scripts\common.j save again but dont use those natives on custom units. Will crash the game. |
| 01-22-2009, 06:49 PM | #8 |
It still doesn't work for me o_O, i've tried the function UnitAlive. Did you recently tested it, and if you had it succesfully, could you attach a map plz. |
| 01-22-2009, 07:02 PM | #9 |
sure ... tested this map with both 1.21 and 1.22 ...worked for both (for me) |
| 01-22-2009, 07:36 PM | #10 |
Oh it seems i can't use the common.j extracted from war3.mpq and war3x.mpq (patch 1.22) Now it works, thx. But just to know which common.j did you used, the one included in the JNGP ? |
| 01-22-2009, 08:08 PM | #11 |
that should be the reason mine is extracted of the war3Patch.mpq (of my 1.21 installation) the one that came with JNGP is the japi one !? |
| 01-22-2009, 09:35 PM | #12 |
The folder JassHelper have the same common.j of war3patch.mpq The folder japi have the ... japi one ![]() It seems Blizzard have added some types and functions during the patchs. I didn't know that, i've started to use the editor when all types/functions were done. I've learned the lesson, always check in the war3pactch.mpq first. |
